Page MenuHomePhabricator

refactor: remove more unused config argument
AbandonedPublic

Authored by PiRK on Oct 11 2022, 08:19.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Summary

D12202 removed the config argument from two functions, which makes that argument also unused in most of the callers of these 2 functions.

Depends on D12202

Test Plan

ninja all check-all

Event Timeline

PiRK requested review of this revision.Oct 11 2022, 08:19
PiRK planned changes to this revision.Oct 11 2022, 08:46

Split into smaller pieces if possible

PiRK retitled this revision from refactor: pass CChainParams instead of Config to a few functions and structs to refactor: use m_params member variable in CChainState instead of config.
PiRK edited the summary of this revision. (Show Details)
PiRK edited the test plan for this revision. (Show Details)

rebase on D12203 and reduce the scope of the diff

Fabien added a subscriber: Fabien.
Fabien added inline comments.
src/validation.h
1012

Unrelated: there is an interesting annotation pattern mix here, something has not been backported properly

This revision is now accepted and ready to land.Oct 11 2022, 14:36

Tail of the build log:

-- Installing: /results/artifacts/lib/libsecp256k1.a
-- Installing: /results/artifacts/include/secp256k1.h
-- Installing: /results/artifacts/include/secp256k1_preallocated.h
-- Installing: /results/artifacts/include/secp256k1_recovery.h
-- Installing: /results/artifacts/include/secp256k1_schnorr.h
[355/523] Linking C executable src/secp256k1/internal-bench
[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:747:22: error: lambda capture 'args' is not used [-Werror,-Wunused-lambda-capture]
                   [&args, this](const auto &tx) {
                    ~^~~~~
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/wallet/CMakeFiles/wallet-tool.dir/wallettool.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.dir/bdb.cpp.o
[366/523] Building CXX object src/wallet/CMakeFiles/wallet.dir/coincontrol.cpp.o
[367/523] Building CXX object src/wallet/CMakeFiles/wallet.dir/coinselection.cpp.o
[368/523] Building CXX object src/wallet/CMakeFiles/wallet.dir/context.cpp.o
[369/523] Building CXX object src/wallet/CMakeFiles/wallet.dir/crypter.cpp.o
[370/523] Building CXX object src/wallet/CMakeFiles/wallet.dir/db.cpp.o
[371/523] Building CXX object src/wallet/CMakeFiles/wallet.dir/fees.cpp.o
[372/523] Building CXX object src/wallet/CMakeFiles/wallet.dir/load.cpp.o
[373/523] Building CXX object src/CMakeFiles/server.dir/rpc/mining.cpp.o
[374/523] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpcdump.cpp.o
[375/523] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpcwallet.cpp.o
[376/523] Building CXX object src/wallet/CMakeFiles/wallet.dir/salvage.cpp.o
[377/523] Building CXX object src/wallet/CMakeFiles/wallet.dir/sqlite.cpp.o
[378/523] Building CXX object src/wallet/CMakeFiles/wallet.dir/scriptpubkeyman.cpp.o
[379/523] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletdb.cpp.o
[380/523] Building CXX object src/wallet/CMakeFiles/wallet.dir/wallet.cpp.o
[381/523] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletutil.cpp.o
[382/523] Linking CXX static library src/wallet/libwallet.a
[383/523] Building CXX object src/CMakeFiles/server.dir/torcontrol.cpp.o
[384/523] Building CXX object src/test/CMakeFiles/testutil.dir/util/blockfilter.cpp.o
[385/523] Linking CXX static library src/wallet/libwallet-tool.a
[386/523] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/db.cpp.o
[387/523] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/dns.cpp.o
[388/523] Building CXX object src/seeder/CMakeFiles/bitcoin-seeder.dir/main.cpp.o
[389/523] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/options.cpp.o
[390/523] Linking CXX executable src/bitcoin-wallet
[391/523] Building CXX object src/CMakeFiles/server.dir/rpc/net.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/rpc/avalanche.cpp.o
[394/523] Building CXX object src/test/CMakeFiles/testutil.dir/util/net.cpp.o
[395/523] Building CXX object src/CMakeFiles/server.dir/txmempool.cpp.o
[396/523] Building CXX object src/CMakeFiles/server.dir/wallet/init.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
PiRK planned changes to this revision.Oct 12 2022, 11:21

wait for D12213 then rebase

PiRK retitled this revision from refactor: use m_params member variable in CChainState instead of config to refactor: remove more unused config argument.
PiRK edited the summary of this revision. (Show Details)

rebase and fix revision title (this only removes unused config arguments, using m_params is done in parent diffs)

This revision is now accepted and ready to land.Oct 14 2022, 07:37
PiRK planned changes to this revision.Oct 21 2022, 06:49

abandoning old diffs