Page MenuHomePhabricator

refactor: use chainman instead of chainParams for DeploymentActive*
ClosedPublic

Authored by PiRK on Mar 29 2024, 08:45.

Details

Summary

This is a partial backport of core#24595
https://github.com/bitcoin/bitcoin/pull/24595/commits/deffe0df6c36225bada18603b5a840139f030f2c
https://github.com/bitcoin/bitcoin/pull/24595/commits/78adef17536edef833a0bfca06b61ce28120e486

We don't have a g_versionbitscache global, and the point of the PR in the source material is to make that global a ChainstateManager member. The only rationale for backporting this in Bitcoin ABC is to make following backports easier (for instance in core#25704 one of the functions touched here will use the chainman argument)

Depends on D15808

Test Plan

ninja all check-all

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

PiRK requested review of this revision.Mar 29 2024, 08:45

Tail of the build log:

[376/552] Building CXX object src/test/CMakeFiles/testutil.dir/util/logging.cpp.o
[377/552] Building CXX object src/CMakeFiles/server.dir/rpc/mining.cpp.o
[378/552] Building CXX object src/CMakeFiles/server.dir/rpc/net.cpp.o
[379/552] Building CXX object src/CMakeFiles/server.dir/txorphanage.cpp.o
[380/552] Building CXX object src/test/CMakeFiles/testutil.dir/util/str.cpp.o
[381/552] Building CXX object src/test/CMakeFiles/testutil.dir/util/transaction_utils.cpp.o
[382/552] Building CXX object src/CMakeFiles/server.dir/rpc/avalanche.cpp.o
[383/552] 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_ALL_NO_LIB -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 -fcf-protection=full -fstack-clash-protection -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 -Wno-psabi -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:875:11: error: lambda capture 'args' is not used [-Werror,-Wunused-lambda-capture]
        [&args, this](const auto &tx) {
         ~^~~~~
1 error generated.
[384/552] Building C object src/secp256k1/CMakeFiles/internal-bench.dir/src/bench_internal.c.o
[385/552] Building CXX object src/CMakeFiles/server.dir/txmempool.cpp.o
[386/552] Building CXX object src/wallet/CMakeFiles/wallet.dir/bdb.cpp.o
[387/552] Linking C executable src/secp256k1/internal-bench
[388/552] Building CXX object src/wallet/CMakeFiles/wallet.dir/coincontrol.cpp.o
[389/552] Building CXX object src/wallet/CMakeFiles/wallet.dir/context.cpp.o
[390/552] Building CXX object src/wallet/CMakeFiles/wallet.dir/coinselection.cpp.o
[391/552] Building CXX object src/wallet/CMakeFiles/wallet-tool.dir/wallettool.cpp.o
[392/552] Building CXX object src/test/CMakeFiles/testutil.dir/util/blockfilter.cpp.o
[393/552] Building CXX object src/CMakeFiles/server.dir/torcontrol.cpp.o
[394/552] Building CXX object src/wallet/CMakeFiles/wallet.dir/load.cpp.o
[395/552] Building CXX object src/wallet/CMakeFiles/wallet.dir/receive.cpp.o
[396/552] Building CXX object src/wallet/CMakeFiles/wallet.dir/db.cpp.o
[397/552] Building CXX object src/test/CMakeFiles/testutil.dir/util/net.cpp.o
[398/552] Building CXX object src/wallet/CMakeFiles/wallet.dir/crypter.cpp.o
[399/552] Building CXX object src/CMakeFiles/server.dir/rpc/blockchain.cpp.o
[400/552] Building CXX object src/test/CMakeFiles/testutil.dir/util/mining.cpp.o
[401/552] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpc/util.cpp.o
[402/552] Building CXX object src/CMakeFiles/server.dir/wallet/init.cpp.o
[403/552] Building CXX object src/wallet/CMakeFiles/wallet.dir/spend.cpp.o
[404/552] Building CXX object src/test/CMakeFiles/testutil.dir/util/validation.cpp.o
[405/552] Building CXX object src/wallet/CMakeFiles/wallet.dir/sqlite.cpp.o
[406/552] Building CXX object src/wallet/CMakeFiles/wallet.dir/transaction.cpp.o
[407/552] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletdb.cpp.o
[408/552] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletutil.cpp.o
[409/552] Building CXX object src/test/CMakeFiles/testutil.dir/util/wallet.cpp.o
[410/552] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/db.cpp.o
[411/552] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/dns.cpp.o
[412/552] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/options.cpp.o
[413/552] Building CXX object src/seeder/CMakeFiles/bitcoin-seeder.dir/main.cpp.o
[414/552] Building CXX object src/CMakeFiles/server.dir/rpc/rawtransaction.cpp.o
[415/552] Building CXX object src/wallet/CMakeFiles/wallet.dir/fees.cpp.o
[416/552] Building CXX object src/test/CMakeFiles/testutil.dir/util/setup_common.cpp.o
[417/552] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpc/signmessage.cpp.o
[418/552] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpc/encrypt.cpp.o
[419/552] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/bitcoin.cpp.o
[420/552] Building CXX object src/CMakeFiles/server.dir/net_processing.cpp.o
[421/552] Building CXX object src/wallet/CMakeFiles/wallet.dir/salvage.cpp.o
[422/552] Building CXX object src/wallet/CMakeFiles/wallet.dir/interfaces.cpp.o
[423/552] Building CXX object src/wallet/CMakeFiles/wallet.dir/scriptpubkeyman.cpp.o
[424/552] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpc/backup.cpp.o
[425/552] Building CXX object src/wallet/CMakeFiles/wallet.dir/wallet.cpp.o
[426/552] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpcwallet.cpp.o
[427/552] Linking CXX static library src/wallet/libwallet.a
ninja: build stopped: cannot make progress due to previous errors.
Build build-clang failed with exit code 1
PiRK planned changes to this revision.Mar 29 2024, 08:55
PiRK edited the summary of this revision. (Show Details)

fix clang tidy warning

remove unused args in lambda

This revision is now accepted and ready to land.Mar 29 2024, 15:36