Page MenuHomePhabricator

[net] remove fUpdateConnectionTime from FinalizeNode
ClosedPublic

Authored by Fabien on Oct 14 2022, 12:12.

Details

Reviewers
PiRK
Group Reviewers
Restricted Project
Commits
rABCf67bd495370e: [net] remove fUpdateConnectionTime from FinalizeNode
Summary
PeerManager can just call directly into CAddrMan::Connected() now.

Completes backport of core#20228:
https://github.com/bitcoin/bitcoin/pull/20228/commits/3fc06d3d7b43dc1143fe0850db23c4e7ffbfe682

Depends on D12250.

Test Plan
ninja all check-all

Event Timeline

Fabien requested review of this revision.Oct 14 2022, 12:12

Tail of the build log:

-- Installing: /results/artifacts/include/secp256k1_schnorr.h
[352/524] Building CXX object src/test/CMakeFiles/testutil.dir/util/blockfilter.cpp.o
[353/524] Building CXX object src/test/CMakeFiles/testutil.dir/util/logging.cpp.o
[354/524] Building CXX object src/test/CMakeFiles/testutil.dir/util/mining.cpp.o
[355/524] Linking CXX static library src/libscript.a
[356/524] Linking CXX static library src/libbitcoinconsensus.a
[357/524] Building CXX object src/CMakeFiles/server.dir/rpc/mining.cpp.o
[358/524] Linking CXX shared library src/libbitcoinconsensus.so.0.26.4
[359/524] Creating library symlink src/libbitcoinconsensus.so.0 src/libbitcoinconsensus.so
[360/524] Linking CXX executable src/bitcoin-cli
[361/524] Building CXX object src/CMakeFiles/server.dir/avalanche/processor.cpp.o
[362/524] Building CXX object src/test/CMakeFiles/testutil.dir/util/str.cpp.o
[363/524] Building CXX object src/test/CMakeFiles/testutil.dir/util/transaction_utils.cpp.o
[364/524] Building CXX object src/test/CMakeFiles/testutil.dir/util/wallet.cpp.o
[365/524] Building CXX object src/wallet/CMakeFiles/wallet-tool.dir/wallettool.cpp.o
[366/524] Building CXX object src/wallet/CMakeFiles/wallet.dir/__/interfaces/wallet.cpp.o
[367/524] Building CXX object src/wallet/CMakeFiles/wallet.dir/bdb.cpp.o
[368/524] Building CXX object src/wallet/CMakeFiles/wallet.dir/coincontrol.cpp.o
[369/524] Building CXX object src/wallet/CMakeFiles/wallet.dir/coinselection.cpp.o
[370/524] Building CXX object src/wallet/CMakeFiles/wallet.dir/context.cpp.o
[371/524] Building CXX object src/wallet/CMakeFiles/wallet.dir/crypter.cpp.o
[372/524] Building CXX object src/wallet/CMakeFiles/wallet.dir/db.cpp.o
[373/524] Building CXX object src/wallet/CMakeFiles/wallet.dir/load.cpp.o
[374/524] Building CXX object src/wallet/CMakeFiles/wallet.dir/fees.cpp.o
[375/524] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpcdump.cpp.o
[376/524] Building CXX object src/CMakeFiles/server.dir/rpc/net.cpp.o
[377/524] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpcwallet.cpp.o
[378/524] Building CXX object src/CMakeFiles/server.dir/rpc/avalanche.cpp.o
[379/524] Building CXX object src/wallet/CMakeFiles/wallet.dir/salvage.cpp.o
[380/524] Building CXX object src/wallet/CMakeFiles/wallet.dir/sqlite.cpp.o
[381/524] Building CXX object src/wallet/CMakeFiles/wallet.dir/scriptpubkeyman.cpp.o
[382/524] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletutil.cpp.o
[383/524] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletdb.cpp.o
[384/524] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/db.cpp.o
[385/524] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/dns.cpp.o
[386/524] Building CXX object src/wallet/CMakeFiles/wallet.dir/wallet.cpp.o
[387/524] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/options.cpp.o
[388/524] Building CXX object src/seeder/CMakeFiles/bitcoin-seeder.dir/main.cpp.o
[389/524] Linking CXX executable src/bitcoin-tx
[390/524] Linking CXX static library src/wallet/libwallet.a
[391/524] Linking CXX static library src/wallet/libwallet-tool.a
[392/524] Building CXX object src/CMakeFiles/server.dir/net.cpp.o
[393/524] Building CXX object src/CMakeFiles/server.dir/init.cpp.o
[394/524] Linking CXX executable src/bitcoin-wallet
[395/524] Building CXX object src/CMakeFiles/server.dir/txorphanage.cpp.o
[396/524] Building CXX object src/CMakeFiles/server.dir/net_processing.cpp.o
FAILED: src/CMakeFiles/server.dir/net_processing.cpp.o 
/usr/bin/ccache /usr/bin/c++ -DABORT_ON_FAILED_ASSUME -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 -DDEBUG -DDEBUG_LOCKORDER -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 -O0 -fPIC -fvisibility=hidden -g3 -ftrapv -fstack-reuse=none -fstack-protector-all -Wstack-protector -U_FORTIFY_SOURCE -Wall -Wextra -Wformat -Wvla -Wcast-align -Wunused-parameter -Wmissing-braces -Wredundant-decls -Wsign-compare -Wduplicated-branches -Wduplicated-cond -Wlogical-op -Wformat-security -Wredundant-move -Woverloaded-virtual -Wno-unused-parameter -Wno-implicit-fallthrough -pthread -std=gnu++17 -MD -MT src/CMakeFiles/server.dir/net_processing.cpp.o -MF src/CMakeFiles/server.dir/net_processing.cpp.o.d -o src/CMakeFiles/server.dir/net_processing.cpp.o -c ../../src/net_processing.cpp
../../src/net_processing.cpp:657:32: error: ‘maybe_unused’ attribute ignored [-Werror=attributes]
  657 |     [[maybe_unused]] CAddrMan &m_addrman;
      |                                ^~~~~~~~~
cc1plus: all warnings being treated as errors
[397/524] Building CXX object src/test/CMakeFiles/testutil.dir/util/net.cpp.o
[398/524] Building CXX object src/CMakeFiles/server.dir/torcontrol.cpp.o
[399/524] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/bitcoin.cpp.o
[400/524] Building CXX object src/CMakeFiles/server.dir/wallet/init.cpp.o
[401/524] Building CXX object src/test/CMakeFiles/testutil.dir/util/setup_common.cpp.o
[402/524] Building CXX object src/CMakeFiles/server.dir/validation.cpp.o
ninja: build stopped: cannot make progress due to previous errors.
Build build-debug failed with exit code 1

Tail of the build log:

[328/470] Building CXX object src/CMakeFiles/server.dir/interfaces/chain.cpp.o
[329/470] Building CXX object src/CMakeFiles/server.dir/invrequest.cpp.o
[330/470] Building CXX object src/CMakeFiles/server.dir/validationinterface.cpp.o
[331/470] Building CXX object src/CMakeFiles/server.dir/versionbits.cpp.o
[332/470] Building CXX object src/CMakeFiles/server.dir/dummywallet.cpp.o
[333/470] Building CXX object src/CMakeFiles/bitcoin-tx.dir/bitcoin-tx.cpp.o
[334/470] Building CXX object src/CMakeFiles/server.dir/mapport.cpp.o
[335/470] Building CXX object src/CMakeFiles/bitcoind.dir/bitcoind.cpp.o
[336/470] Building CXX object src/test/CMakeFiles/testutil.dir/util/blockfilter.cpp.o
[337/470] Building CXX object src/test/CMakeFiles/testutil.dir/util/logging.cpp.o
[338/470] Building C object src/secp256k1/CMakeFiles/secp256k1.dir/src/secp256k1.c.o
[339/470] Building CXX object src/test/CMakeFiles/testutil.dir/util/mining.cpp.o
[340/470] Building C object src/secp256k1/CMakeFiles/recover-bench.dir/src/bench_recover.c.o
[341/470] Linking C static library src/secp256k1/libsecp256k1.a
[342/470] Building C object src/secp256k1/CMakeFiles/ecmult-bench.dir/src/bench_ecmult.c.o
[343/470] Building CXX object src/CMakeFiles/server.dir/interfaces/node.cpp.o
[344/470] Linking CXX static library src/libscript.a
[345/470] Linking C executable src/secp256k1/recover-bench
[346/470] Building C object src/secp256k1/CMakeFiles/verify-bench.dir/src/bench_verify.c.o
[347/470] Linking C executable src/secp256k1/ecmult-bench
[348/470] Linking C executable src/secp256k1/verify-bench
[349/470] Building C object src/secp256k1/CMakeFiles/internal-bench.dir/src/bench_internal.c.o
[350/470] Linking C executable src/secp256k1/internal-bench
[351/470] Linking CXX static library src/libbitcoinconsensus.a
[352/470] Building C object src/secp256k1/CMakeFiles/sign-bench.dir/src/bench_sign.c.o
[353/470] Linking C executable src/secp256k1/sign-bench
[354/470] Linking CXX static library src/libcommon.a
[355/470] Linking CXX shared library src/libbitcoinconsensus.so.0.26.4
[356/470] Creating library symlink src/libbitcoinconsensus.so.0 src/libbitcoinconsensus.so
[357/470] Building CXX object src/CMakeFiles/server.dir/miner.cpp.o
[358/470] Linking CXX executable src/bitcoin-cli
[359/470] Building CXX object src/test/CMakeFiles/testutil.dir/util/str.cpp.o
[360/470] Building CXX object src/test/CMakeFiles/testutil.dir/util/transaction_utils.cpp.o
[361/470] Building CXX object src/test/CMakeFiles/testutil.dir/util/wallet.cpp.o
[362/470] Linking CXX executable src/bitcoin-tx
[363/470] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/db.cpp.o
[364/470] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/dns.cpp.o
[365/470] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/options.cpp.o
[366/470] Building CXX object src/seeder/CMakeFiles/bitcoin-seeder.dir/main.cpp.o
[367/470] Building CXX object src/CMakeFiles/server.dir/avalanche/processor.cpp.o
[368/470] Building CXX object src/CMakeFiles/server.dir/txorphanage.cpp.o
[369/470] Building CXX object src/test/CMakeFiles/testutil.dir/util/net.cpp.o
[370/470] Building CXX object src/CMakeFiles/server.dir/rpc/mining.cpp.o
[371/470] Building CXX object src/CMakeFiles/server.dir/rpc/net.cpp.o
[372/470] Building CXX object src/CMakeFiles/server.dir/rpc/avalanche.cpp.o
[373/470] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/bitcoin.cpp.o
[374/470] Building CXX object src/CMakeFiles/server.dir/torcontrol.cpp.o
[375/470] Building CXX object src/test/CMakeFiles/testutil.dir/util/setup_common.cpp.o
[376/470] Building CXX object src/CMakeFiles/server.dir/net.cpp.o
[377/470] Building CXX object src/CMakeFiles/server.dir/net_processing.cpp.o
FAILED: src/CMakeFiles/server.dir/net_processing.cpp.o 
/usr/bin/ccache /usr/bin/c++ -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-reuse=none -fstack-protector-all -Wstack-protector -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Wall -Wextra -Wformat -Wvla -Wcast-align -Wunused-parameter -Wmissing-braces -Wredundant-decls -Wsign-compare -Wduplicated-branches -Wduplicated-cond -Wlogical-op -Wformat-security -Wredundant-move -Woverloaded-virtual -Wno-unused-parameter -Wno-implicit-fallthrough -pthread -std=gnu++17 -MD -MT src/CMakeFiles/server.dir/net_processing.cpp.o -MF src/CMakeFiles/server.dir/net_processing.cpp.o.d -o src/CMakeFiles/server.dir/net_processing.cpp.o -c ../../src/net_processing.cpp
../../src/net_processing.cpp:657:32: error: ‘maybe_unused’ attribute ignored [-Werror=attributes]
  657 |     [[maybe_unused]] CAddrMan &m_addrman;
      |                                ^~~~~~~~~
cc1plus: all warnings being treated as errors
[378/470] Building CXX object src/CMakeFiles/server.dir/validation.cpp.o
[379/470] Building CXX object src/CMakeFiles/server.dir/init.cpp.o
ninja: build stopped: cannot make progress due to previous errors.
Build build-without-wallet failed with exit code 1

Tail of the build log:

-- Installing: /results/artifacts/include/secp256k1_recovery.h
-- Installing: /results/artifacts/include/secp256k1_schnorr.h
[353/524] Linking CXX shared library src/libbitcoinconsensus.so.0.26.4
[354/524] Creating library symlink src/libbitcoinconsensus.so.0 src/libbitcoinconsensus.so
[355/524] Linking CXX executable src/bitcoin-cli
[356/524] Building CXX object src/test/CMakeFiles/testutil.dir/util/blockfilter.cpp.o
[357/524] Building CXX object src/test/CMakeFiles/testutil.dir/util/logging.cpp.o
[358/524] Building CXX object src/test/CMakeFiles/testutil.dir/util/mining.cpp.o
[359/524] Linking CXX executable src/bitcoin-tx
[360/524] Building CXX object src/CMakeFiles/server.dir/miner.cpp.o
[361/524] Building CXX object src/test/CMakeFiles/testutil.dir/util/str.cpp.o
[362/524] Building CXX object src/test/CMakeFiles/testutil.dir/util/transaction_utils.cpp.o
[363/524] Building CXX object src/test/CMakeFiles/testutil.dir/util/wallet.cpp.o
[364/524] Building CXX object src/wallet/CMakeFiles/wallet-tool.dir/wallettool.cpp.o
[365/524] Building CXX object src/wallet/CMakeFiles/wallet.dir/__/interfaces/wallet.cpp.o
[366/524] Building CXX object src/wallet/CMakeFiles/wallet.dir/bdb.cpp.o
[367/524] Building CXX object src/wallet/CMakeFiles/wallet.dir/coincontrol.cpp.o
[368/524] Building CXX object src/wallet/CMakeFiles/wallet.dir/coinselection.cpp.o
[369/524] Building CXX object src/wallet/CMakeFiles/wallet.dir/context.cpp.o
[370/524] Building CXX object src/wallet/CMakeFiles/wallet.dir/crypter.cpp.o
[371/524] Building CXX object src/wallet/CMakeFiles/wallet.dir/db.cpp.o
[372/524] Building CXX object src/wallet/CMakeFiles/wallet.dir/fees.cpp.o
[373/524] Building CXX object src/wallet/CMakeFiles/wallet.dir/load.cpp.o
[374/524] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpcdump.cpp.o
[375/524] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpcwallet.cpp.o
[376/524] Building CXX object src/wallet/CMakeFiles/wallet.dir/salvage.cpp.o
[377/524] Building CXX object src/wallet/CMakeFiles/wallet.dir/scriptpubkeyman.cpp.o
[378/524] Building CXX object src/CMakeFiles/server.dir/avalanche/processor.cpp.o
[379/524] Building CXX object src/wallet/CMakeFiles/wallet.dir/sqlite.cpp.o
[380/524] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletdb.cpp.o
[381/524] Building CXX object src/wallet/CMakeFiles/wallet.dir/wallet.cpp.o
[382/524] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletutil.cpp.o
[383/524] Linking CXX static library src/wallet/libwallet.a
[384/524] Linking CXX static library src/wallet/libwallet-tool.a
[385/524] Linking CXX executable src/bitcoin-wallet
[386/524] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/db.cpp.o
[387/524] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/dns.cpp.o
[388/524] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/options.cpp.o
[389/524] Building CXX object src/seeder/CMakeFiles/bitcoin-seeder.dir/main.cpp.o
[390/524] Building CXX object src/CMakeFiles/server.dir/txorphanage.cpp.o
[391/524] Building CXX object src/test/CMakeFiles/testutil.dir/util/net.cpp.o
[392/524] Building CXX object src/CMakeFiles/server.dir/rpc/mining.cpp.o
[393/524] Building CXX object src/CMakeFiles/server.dir/wallet/init.cpp.o
[394/524] Building CXX object src/CMakeFiles/server.dir/rpc/net.cpp.o
[395/524] Building CXX object src/CMakeFiles/server.dir/rpc/avalanche.cpp.o
[396/524] Building CXX object src/CMakeFiles/server.dir/torcontrol.cpp.o
[397/524] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/bitcoin.cpp.o
[398/524] Building CXX object src/CMakeFiles/server.dir/net.cpp.o
[399/524] Building CXX object src/test/CMakeFiles/testutil.dir/util/setup_common.cpp.o
[400/524] Building CXX object src/CMakeFiles/server.dir/net_processing.cpp.o
FAILED: src/CMakeFiles/server.dir/net_processing.cpp.o 
/usr/bin/ccache /usr/bin/c++ -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-reuse=none -fstack-protector-all -Wstack-protector -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Wall -Wextra -Wformat -Wvla -Wcast-align -Wunused-parameter -Wmissing-braces -Wredundant-decls -Wsign-compare -Wduplicated-branches -Wduplicated-cond -Wlogical-op -Wformat-security -Wredundant-move -Woverloaded-virtual -Wno-unused-parameter -Wno-implicit-fallthrough -pthread -std=gnu++17 -MD -MT src/CMakeFiles/server.dir/net_processing.cpp.o -MF src/CMakeFiles/server.dir/net_processing.cpp.o.d -o src/CMakeFiles/server.dir/net_processing.cpp.o -c ../../src/net_processing.cpp
../../src/net_processing.cpp:657:32: error: ‘maybe_unused’ attribute ignored [-Werror=attributes]
  657 |     [[maybe_unused]] CAddrMan &m_addrman;
      |                                ^~~~~~~~~
cc1plus: all warnings being treated as errors
[401/524] Building CXX object src/CMakeFiles/server.dir/init.cpp.o
[402/524] Building CXX object src/CMakeFiles/server.dir/validation.cpp.o
ninja: build stopped: cannot make progress due to previous errors.
Build build-diff failed with exit code 1
This revision is now accepted and ready to land.Oct 14 2022, 14:02