Page MenuHomePhabricator

refactor: Remove config arg from CChainState member functions
AbandonedPublic

Authored by PiRK on Oct 10 2022, 14:14.

Details

Reviewers
None
Group Reviewers
Restricted Project
Summary

D12191 introduced a member variable for the config, so use it.
This has the added benefit of making the member functions' signature more similar to the source material.

Depends on D12191

Test Plan

ninja all check-all

Event Timeline

PiRK requested review of this revision.Oct 10 2022, 14:14

Tail of the build log:

-- Installing: /results/artifacts/include/secp256k1_schnorr.h
[355/523] Building CXX object src/CMakeFiles/server.dir/init.cpp.o
[356/523] Building CXX object src/test/CMakeFiles/testutil.dir/util/logging.cpp.o
[357/523] Building CXX object src/CMakeFiles/server.dir/txorphanage.cpp.o
[358/523] Building CXX object src/CMakeFiles/server.dir/validation.cpp.o
FAILED: src/CMakeFiles/server.dir/validation.cpp.o 
/usr/bin/ccache /usr/bin/clang++ -DBOOST_AC_USE_STD_ATOMIC -DBOOST_ALL_NO_LIB -DBOOST_ATOMIC_DYN_LINK -DBOOST_FILESYSTEM_DYN_LINK -DBOOST_SP_USE_STD_ATOMIC -DBOOST_THREAD_DYN_LINK -DBUILD_BITCOIN_INTERNAL -DENABLE_AVX2 -DENABLE_SHANI -DENABLE_SSE41 -DHAVE_BUILD_INFO -DHAVE_CONFIG_H -DHAVE_CONSENSUS_LIB -DLEVELDB_ATOMIC_PRESENT -DLEVELDB_PLATFORM_POSIX -DOS_LINUX -I../../src/leveldb/helpers/memenv -I../../src/. -Isrc -I../../src/univalue/include -Isrc/crypto/.. -I../../src/secp256k1/include -I../../src/leveldb/include -isystem /usr/include/jemalloc -isystem /usr/include/miniupnpc -Werror -g -O2 -fPIC -fvisibility=hidden -fstack-protector-all -Wstack-protector -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Wall -Wextra -Wformat -Wgnu -Wvla -Wcast-align -Wunused-parameter -Wmissing-braces -Wthread-safety -Wrange-loop-analysis -Wredundant-decls -Wunreachable-code-loop-increment -Wsign-compare -Wconditional-uninitialized -Wdocumentation -Wformat-security -Wredundant-move -Woverloaded-virtual -Wshadow -Wshadow-field -Wno-unused-parameter -Wno-implicit-fallthrough -pthread -std=gnu++17 -MD -MT src/CMakeFiles/server.dir/validation.cpp.o -MF src/CMakeFiles/server.dir/validation.cpp.o.d -o src/CMakeFiles/server.dir/validation.cpp.o -c ../../src/validation.cpp
../../src/validation.cpp:4055:19: error: parameter 'config' not found in the function declaration [-Werror,-Wdocumentation]
 * @param[in]     config     The global config.
                  ^~~~~~
../../src/validation.cpp:4055:19: note: did you mean 'state'?
 * @param[in]     config     The global config.
                  ^~~~~~
                  state
1 error generated.
[359/523] Building CXX object src/CMakeFiles/server.dir/net.cpp.o
[360/523] Building CXX object src/test/CMakeFiles/testutil.dir/util/str.cpp.o
[361/523] Building CXX object src/test/CMakeFiles/testutil.dir/util/transaction_utils.cpp.o
[362/523] Building CXX object src/test/CMakeFiles/testutil.dir/util/wallet.cpp.o
[363/523] Building CXX object src/CMakeFiles/server.dir/torcontrol.cpp.o
[364/523] Building CXX object src/wallet/CMakeFiles/wallet.dir/__/interfaces/wallet.cpp.o
[365/523] Building CXX object src/wallet/CMakeFiles/wallet-tool.dir/wallettool.cpp.o
[366/523] Building CXX object src/wallet/CMakeFiles/wallet.dir/bdb.cpp.o
[367/523] Building CXX object src/wallet/CMakeFiles/wallet.dir/coincontrol.cpp.o
[368/523] Building CXX object src/wallet/CMakeFiles/wallet.dir/coinselection.cpp.o
[369/523] Building CXX object src/wallet/CMakeFiles/wallet.dir/context.cpp.o
[370/523] Building CXX object src/CMakeFiles/server.dir/rpc/avalanche.cpp.o
[371/523] Building CXX object src/wallet/CMakeFiles/wallet.dir/crypter.cpp.o
[372/523] Building CXX object src/wallet/CMakeFiles/wallet.dir/db.cpp.o
[373/523] Building CXX object src/wallet/CMakeFiles/wallet.dir/load.cpp.o
[374/523] Building CXX object src/wallet/CMakeFiles/wallet.dir/fees.cpp.o
[375/523] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpcdump.cpp.o
[376/523] Building CXX object src/test/CMakeFiles/testutil.dir/util/blockfilter.cpp.o
[377/523] Building CXX object src/wallet/CMakeFiles/wallet.dir/salvage.cpp.o
[378/523] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpcwallet.cpp.o
[379/523] Building CXX object src/wallet/CMakeFiles/wallet.dir/sqlite.cpp.o
[380/523] Building CXX object src/wallet/CMakeFiles/wallet.dir/scriptpubkeyman.cpp.o
[381/523] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletdb.cpp.o
[382/523] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/db.cpp.o
[383/523] Building CXX object src/wallet/CMakeFiles/wallet.dir/wallet.cpp.o
[384/523] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletutil.cpp.o
[385/523] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/dns.cpp.o
[386/523] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/options.cpp.o
[387/523] Building CXX object src/seeder/CMakeFiles/bitcoin-seeder.dir/main.cpp.o
[388/523] Linking CXX static library src/wallet/libwallet.a
[389/523] Linking CXX static library src/wallet/libwallet-tool.a
[390/523] Linking CXX executable src/bitcoin-wallet
[391/523] Building CXX object src/CMakeFiles/server.dir/rpc/mining.cpp.o
[392/523] Building CXX object src/test/CMakeFiles/testutil.dir/util/mining.cpp.o
[393/523] Building CXX object src/CMakeFiles/server.dir/txmempool.cpp.o
[394/523] Building CXX object src/CMakeFiles/server.dir/rpc/net.cpp.o
[395/523] Building CXX object src/CMakeFiles/server.dir/wallet/init.cpp.o
[396/523] Building CXX object src/test/CMakeFiles/testutil.dir/util/net.cpp.o
[397/523] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/bitcoin.cpp.o
[398/523] Building CXX object src/test/CMakeFiles/testutil.dir/util/setup_common.cpp.o
[399/523] Building CXX object src/CMakeFiles/server.dir/rpc/rawtransaction.cpp.o
[400/523] Building CXX object src/CMakeFiles/server.dir/rpc/blockchain.cpp.o
[401/523] Building CXX object src/CMakeFiles/server.dir/net_processing.cpp.o
ninja: build stopped: cannot make progress due to previous errors.
Build build-clang failed with exit code 1

Tail of the build log:

[514/716] Building CXX object src/test/fuzz/CMakeFiles/fuzz-script_sigcache.dir/script_sigcache.cpp.o
[515/716] Building CXX object src/test/fuzz/CMakeFiles/fuzz-netaddress.dir/fuzz.cpp.o
[516/716] Building CXX object src/test/fuzz/CMakeFiles/fuzz-netaddress.dir/netaddress.cpp.o
[517/716] Building CXX object src/test/fuzz/CMakeFiles/fuzz-merkle_block_deserialize.dir/fuzz.cpp.o
[518/716] Building CXX object src/test/fuzz/CMakeFiles/fuzz-block_file_info_deserialize.dir/deserialize.cpp.o
[519/716] Building CXX object src/test/fuzz/CMakeFiles/fuzz-netaddr_deserialize.dir/fuzz.cpp.o
[520/716] Building CXX object src/test/fuzz/CMakeFiles/fuzz-coins_view.dir/coins_view.cpp.o
[521/716] Building CXX object src/test/fuzz/CMakeFiles/fuzz-partially_signed_transaction_deserialize.dir/fuzz.cpp.o
[522/716] Building CXX object src/test/fuzz/CMakeFiles/fuzz-blockheader_deserialize.dir/deserialize.cpp.o
[523/716] Building CXX object src/test/fuzz/CMakeFiles/fuzz-blocktransactions_deserialize.dir/fuzz.cpp.o
[524/716] Building CXX object src/test/fuzz/CMakeFiles/fuzz-blocklocator_deserialize.dir/deserialize.cpp.o
[525/716] Building CXX object src/test/fuzz/CMakeFiles/fuzz-psbt_output_deserialize.dir/fuzz.cpp.o
[526/716] Building CXX object src/test/fuzz/CMakeFiles/fuzz-psbt_input_deserialize.dir/deserialize.cpp.o
[527/716] Building CXX object src/test/fuzz/CMakeFiles/fuzz-sub_net_deserialize.dir/fuzz.cpp.o
[528/716] Building CXX object src/test/fuzz/CMakeFiles/fuzz-process_message_filteradd.dir/process_message.cpp.o
[529/716] Building CXX object src/test/fuzz/CMakeFiles/fuzz-script_descriptor_cache.dir/script_descriptor_cache.cpp.o
[530/716] Building CXX object src/test/fuzz/CMakeFiles/fuzz-blocktransactionsrequest_deserialize.dir/deserialize.cpp.o
[531/716] Building CXX object src/test/fuzz/CMakeFiles/fuzz-txundo_deserialize.dir/fuzz.cpp.o
[532/716] Building CXX object src/test/fuzz/CMakeFiles/fuzz-tx_in_deserialize.dir/fuzz.cpp.o
[533/716] Building CXX object src/test/fuzz/CMakeFiles/fuzz-txoutcompressor_deserialize.dir/fuzz.cpp.o
[534/716] Building CXX object src/test/fuzz/CMakeFiles/fuzz-fee_rate_deserialize.dir/fuzz.cpp.o
[535/716] Building CXX object src/test/fuzz/CMakeFiles/fuzz-blockmerkleroot.dir/deserialize.cpp.o
[536/716] Building CXX object src/test/fuzz/CMakeFiles/fuzz-blockundo_deserialize.dir/deserialize.cpp.o
[537/716] Building CXX object src/test/fuzz/CMakeFiles/fuzz-process_message_blocktxn.dir/fuzz.cpp.o
[538/716] Building CXX object src/test/fuzz/CMakeFiles/fuzz-inv_deserialize.dir/deserialize.cpp.o
[539/716] Building CXX object src/test/fuzz/CMakeFiles/fuzz-script_deserialize.dir/deserialize.cpp.o
[540/716] Building CXX object src/test/fuzz/CMakeFiles/fuzz-process_message_addr.dir/process_message.cpp.o
[541/716] Building CXX object src/test/fuzz/CMakeFiles/fuzz-process_message_cmpctblock.dir/fuzz.cpp.o
[542/716] Building CXX object src/wallet/CMakeFiles/wallet.dir/bdb.cpp.o
[543/716] Building CXX object src/wallet/CMakeFiles/wallet.dir/coincontrol.cpp.o
[544/716] Building CXX object src/wallet/CMakeFiles/wallet.dir/coinselection.cpp.o
[545/716] Building CXX object src/wallet/CMakeFiles/wallet.dir/context.cpp.o
[546/716] Building CXX object src/wallet/CMakeFiles/wallet.dir/crypter.cpp.o
[547/716] Building CXX object src/wallet/CMakeFiles/wallet.dir/__/interfaces/wallet.cpp.o
[548/716] Building CXX object src/wallet/CMakeFiles/wallet.dir/fees.cpp.o
[549/716] Building CXX object src/test/fuzz/CMakeFiles/fuzz-merkle_block_deserialize.dir/deserialize.cpp.o
[550/716] Building CXX object src/wallet/CMakeFiles/wallet.dir/load.cpp.o
[551/716] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpcdump.cpp.o
[552/716] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpcwallet.cpp.o
[553/716] Building CXX object src/test/fuzz/CMakeFiles/fuzz-netaddr_deserialize.dir/deserialize.cpp.o
[554/716] Building CXX object src/wallet/CMakeFiles/wallet.dir/sqlite.cpp.o
[555/716] Building CXX object src/wallet/CMakeFiles/wallet.dir/salvage.cpp.o
[556/716] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletdb.cpp.o
[557/716] Building CXX object src/test/fuzz/CMakeFiles/fuzz-blocktransactions_deserialize.dir/deserialize.cpp.o
[558/716] Building CXX object src/wallet/CMakeFiles/wallet.dir/db.cpp.o
[559/716] Building CXX object src/test/fuzz/CMakeFiles/fuzz-psbt_output_deserialize.dir/deserialize.cpp.o
[560/716] Building CXX object src/test/fuzz/CMakeFiles/fuzz-sub_net_deserialize.dir/deserialize.cpp.o
[561/716] Building CXX object src/test/fuzz/CMakeFiles/fuzz-tx_in_deserialize.dir/deserialize.cpp.o
[562/716] Building CXX object src/test/fuzz/CMakeFiles/fuzz-partially_signed_transaction_deserialize.dir/deserialize.cpp.o
[563/716] Building CXX object src/test/fuzz/CMakeFiles/fuzz-txoutcompressor_deserialize.dir/deserialize.cpp.o
[564/716] Building CXX object src/test/fuzz/CMakeFiles/fuzz-fee_rate_deserialize.dir/deserialize.cpp.o
[565/716] Building CXX object src/test/fuzz/CMakeFiles/fuzz-txundo_deserialize.dir/deserialize.cpp.o
[566/716] Building CXX object src/test/fuzz/CMakeFiles/fuzz-process_message_blocktxn.dir/process_message.cpp.o
[567/716] Building CXX object src/test/fuzz/CMakeFiles/fuzz-process_message_cmpctblock.dir/process_message.cpp.o
[568/716] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletutil.cpp.o
[569/716] Building CXX object src/wallet/CMakeFiles/wallet.dir/scriptpubkeyman.cpp.o
[570/716] Building CXX object src/wallet/CMakeFiles/wallet.dir/wallet.cpp.o
[571/716] Linking CXX static library src/wallet/libwallet.a
ninja: build stopped: cannot make progress due to previous errors.
Build build-fuzzer failed with exit code 1
PiRK planned changes to this revision.Oct 10 2022, 14:47