Page MenuHomePhabricator

refactor: replace util::Ref with std::any (C++17)
ClosedPublic

Authored by PiRK on Jun 1 2022, 14:33.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABCb5141a711b0c: refactor: replace util::Ref with std::any (C++17)
Summary

As described in util/ref.h: "This implements a small subset of the functionality in C++17's std::any class, and can be dropped when the project updates to C++17". For accessing the contained object of a std::any instance, a helper template function AnyPtr is introduced (thanks to ryanofsky).

Co-authored-by: Russell Yanofsky <russ@yanofsky.org>

This is a backport of core#21366 [1&2/3]
https://github.com/bitcoin/bitcoin/pull/21366/commits/95cccf8a4b392959c1fd7ec0647e04eb13880865
https://github.com/bitcoin/bitcoin/pull/21366/commits/8dbb87a3932f81e23ba7afd865b9aeeb535f0c20

Note: due to D1736, the context is sometimes wrapped in HTTPRPCRequestProcessor instead of being passed directly as a parameter

Depends on D11557

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.Jun 1 2022, 14:33

Tail of the build log:

[347/519] Installing component secp256k1
-- Install configuration: "RelWithDebInfo"
-- Install component: "secp256k1"
-- 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
[348/519] Building CXX object src/test/CMakeFiles/testutil.dir/util/str.cpp.o
[349/519] Building CXX object src/test/CMakeFiles/testutil.dir/util/logging.cpp.o
[350/519] Building CXX object src/CMakeFiles/common.dir/rpc/rawtransaction_util.cpp.o
[351/519] Building CXX object src/CMakeFiles/server.dir/rpc/rawtransaction.cpp.o
[352/519] Building CXX object src/CMakeFiles/bitcoin-wallet.dir/bitcoin-wallet.cpp.o
[353/519] Building CXX object src/CMakeFiles/script.dir/script/signingprovider.cpp.o
[354/519] Building CXX object src/test/CMakeFiles/testutil.dir/util/blockfilter.cpp.o
[355/519] Building CXX object src/test/CMakeFiles/testutil.dir/util/wallet.cpp.o
[356/519] Building CXX object src/CMakeFiles/common.dir/rpc/util.cpp.o
[357/519] Building CXX object src/test/CMakeFiles/testutil.dir/util/mining.cpp.o
[358/519] Building CXX object src/wallet/CMakeFiles/wallet.dir/context.cpp.o
[359/519] Building CXX object src/CMakeFiles/server.dir/rpc/blockchain.cpp.o
[360/519] Building CXX object src/wallet/CMakeFiles/wallet.dir/db.cpp.o
[361/519] Building CXX object src/CMakeFiles/bitcoin-cli.dir/bitcoin-cli.cpp.o
[362/519] Building CXX object src/CMakeFiles/script.dir/script/descriptor.cpp.o
[363/519] Linking CXX static library src/libscript.a
[364/519] Linking CXX static library src/libcommon.a
[365/519] Linking CXX shared library src/libbitcoinconsensus.so.0.25.7
[366/519] Building CXX object src/test/CMakeFiles/testutil.dir/util/net.cpp.o
[367/519] Creating library symlink src/libbitcoinconsensus.so.0 src/libbitcoinconsensus.so
[368/519] Building CXX object src/CMakeFiles/server.dir/net_processing.cpp.o
[369/519] Linking CXX executable src/bitcoin-cli
[370/519] Building CXX object src/wallet/CMakeFiles/wallet.dir/coincontrol.cpp.o
[371/519] Building CXX object src/CMakeFiles/bitcoin-tx.dir/bitcoin-tx.cpp.o
[372/519] Building CXX object src/wallet/CMakeFiles/wallet.dir/crypter.cpp.o
[373/519] Linking CXX executable src/bitcoin-tx
[374/519] Building CXX object src/wallet/CMakeFiles/wallet.dir/coinselection.cpp.o
[375/519] Building CXX object src/wallet/CMakeFiles/wallet.dir/bdb.cpp.o
[376/519] Building CXX object src/test/CMakeFiles/testutil.dir/util/setup_common.cpp.o
[377/519] Building CXX object src/wallet/CMakeFiles/wallet.dir/fees.cpp.o
[378/519] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/db.cpp.o
[379/519] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/dns.cpp.o
[380/519] Building CXX object src/wallet/CMakeFiles/wallet-tool.dir/wallettool.cpp.o
[381/519] Building CXX object src/wallet/CMakeFiles/wallet.dir/sqlite.cpp.o
[382/519] Building CXX object src/wallet/CMakeFiles/wallet.dir/load.cpp.o
[383/519] Building CXX object src/CMakeFiles/server.dir/validation.cpp.o
[384/519] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/options.cpp.o
[385/519] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletutil.cpp.o
[386/519] Building CXX object src/wallet/CMakeFiles/wallet.dir/salvage.cpp.o
[387/519] Building CXX object src/seeder/CMakeFiles/bitcoin-seeder.dir/main.cpp.o
[388/519] Building CXX object src/wallet/CMakeFiles/wallet.dir/__/interfaces/wallet.cpp.o
[389/519] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/bitcoin.cpp.o
[390/519] Building CXX object src/wallet/CMakeFiles/wallet.dir/scriptpubkeyman.cpp.o
[391/519] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletdb.cpp.o
[392/519] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpcdump.cpp.o
[393/519] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpcwallet.cpp.o
[394/519] Building CXX object src/wallet/CMakeFiles/wallet.dir/wallet.cpp.o
[395/519] Linking CXX static library src/wallet/libwallet.a
[396/519] Linking CXX static library src/wallet/libwallet-tool.a
[397/519] Linking CXX executable src/bitcoin-wallet
ninja: build stopped: cannot make progress due to previous errors.
Build build-clang failed with exit code 1

Tail of the build log:

[339/517] Building CXX object src/CMakeFiles/bitcoinconsensus.dir/pubkey.cpp.o
[340/517] Building CXX object src/CMakeFiles/bitcoinconsensus.dir/consensus/tx_check.cpp.o
[341/517] Building CXX object src/CMakeFiles/script.dir/script/standard.cpp.o
[342/517] Building CXX object src/test/CMakeFiles/testutil.dir/util/str.cpp.o
[343/517] Building CXX object src/CMakeFiles/common.dir/rpc/util.cpp.o
[344/517] Building C object src/secp256k1/CMakeFiles/secp256k1.dir/src/secp256k1.c.o
[345/517] Building CXX object src/CMakeFiles/script.dir/script/signingprovider.cpp.o
[346/517] Linking C static library src/secp256k1/libsecp256k1.a
[347/517] Linking CXX static library src/libbitcoinconsensus.a
[348/517] Linking C executable src/secp256k1/ecmult-bench
[349/517] Linking C executable src/secp256k1/internal-bench
[350/517] Linking C executable src/secp256k1/sign-bench
[351/517] Building CXX object src/CMakeFiles/bitcoin-wallet.dir/bitcoin-wallet.cpp.o
[352/517] Linking C executable src/secp256k1/verify-bench
[353/517] Linking C executable src/secp256k1/recover-bench
[354/517] Building CXX object src/CMakeFiles/server.dir/validation.cpp.o
[355/517] Building CXX object src/test/CMakeFiles/testutil.dir/util/logging.cpp.o
[356/517] Building CXX object src/CMakeFiles/bitcoin-cli.dir/bitcoin-cli.cpp.o
[357/517] Building CXX object src/CMakeFiles/script.dir/script/descriptor.cpp.o
[358/517] Linking CXX static library src/libscript.a
[359/517] Building CXX object src/wallet/CMakeFiles/wallet.dir/context.cpp.o
[360/517] Linking CXX static library src/libcommon.a
[361/517] Linking CXX shared library src/libbitcoinconsensus.so.0.25.7
[362/517] Creating library symlink src/libbitcoinconsensus.so.0 src/libbitcoinconsensus.so
[363/517] Linking CXX executable src/bitcoin-cli
[364/517] Building CXX object src/test/CMakeFiles/testutil.dir/util/blockfilter.cpp.o
[365/517] Building CXX object src/test/CMakeFiles/testutil.dir/util/transaction_utils.cpp.o
[366/517] Building CXX object src/test/CMakeFiles/testutil.dir/util/mining.cpp.o
[367/517] Building CXX object src/test/CMakeFiles/testutil.dir/util/net.cpp.o
[368/517] Building CXX object src/wallet/CMakeFiles/wallet.dir/coinselection.cpp.o
[369/517] Building CXX object src/wallet/CMakeFiles/wallet.dir/coincontrol.cpp.o
[370/517] Building CXX object src/CMakeFiles/bitcoin-tx.dir/bitcoin-tx.cpp.o
[371/517] Building CXX object src/wallet/CMakeFiles/wallet.dir/db.cpp.o
[372/517] Linking CXX executable src/bitcoin-tx
[373/517] Building CXX object src/wallet/CMakeFiles/wallet.dir/crypter.cpp.o
[374/517] Building CXX object src/wallet/CMakeFiles/wallet.dir/bdb.cpp.o
[375/517] Building CXX object src/test/CMakeFiles/testutil.dir/util/wallet.cpp.o
[376/517] Building CXX object src/test/CMakeFiles/testutil.dir/util/setup_common.cpp.o
[377/517] Building CXX object src/wallet/CMakeFiles/wallet-tool.dir/wallettool.cpp.o
[378/517] Building CXX object src/wallet/CMakeFiles/wallet.dir/sqlite.cpp.o
[379/517] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/dns.cpp.o
[380/517] Building CXX object src/wallet/CMakeFiles/wallet.dir/fees.cpp.o
[381/517] Building CXX object src/wallet/CMakeFiles/wallet.dir/load.cpp.o
[382/517] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletutil.cpp.o
[383/517] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/db.cpp.o
[384/517] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/options.cpp.o
[385/517] Building CXX object src/wallet/CMakeFiles/wallet.dir/salvage.cpp.o
[386/517] Building CXX object src/wallet/CMakeFiles/wallet.dir/__/interfaces/wallet.cpp.o
[387/517] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/bitcoin.cpp.o
[388/517] Building CXX object src/seeder/CMakeFiles/bitcoin-seeder.dir/main.cpp.o
[389/517] Building CXX object src/wallet/CMakeFiles/wallet.dir/scriptpubkeyman.cpp.o
[390/517] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletdb.cpp.o
[391/517] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpcdump.cpp.o
[392/517] Building CXX object src/wallet/CMakeFiles/wallet.dir/wallet.cpp.o
[393/517] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpcwallet.cpp.o
[394/517] Linking CXX static library src/wallet/libwallet.a
[395/517] Linking CXX static library src/wallet/libwallet-tool.a
[396/517] Linking CXX executable src/bitcoin-wallet
ninja: build stopped: cannot make progress due to previous errors.
Build build-clang-tidy failed with exit code 1
PiRK planned changes to this revision.Jun 1 2022, 15:04

add missing change in server.cpp: copy-initialize the JSONRPCRequest objects.

Tail of the build log:

[347/519] Installing component secp256k1
-- Install configuration: "RelWithDebInfo"
-- Install component: "secp256k1"
-- 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
[348/519] Building CXX object src/test/CMakeFiles/testutil.dir/util/str.cpp.o
[349/519] Building CXX object src/test/CMakeFiles/testutil.dir/util/logging.cpp.o
[350/519] Building CXX object src/CMakeFiles/server.dir/rpc/rawtransaction.cpp.o
[351/519] Building CXX object src/CMakeFiles/common.dir/rpc/rawtransaction_util.cpp.o
[352/519] Building CXX object src/CMakeFiles/bitcoin-wallet.dir/bitcoin-wallet.cpp.o
[353/519] Building CXX object src/CMakeFiles/script.dir/script/signingprovider.cpp.o
[354/519] Building CXX object src/CMakeFiles/server.dir/net_processing.cpp.o
[355/519] Building CXX object src/test/CMakeFiles/testutil.dir/util/blockfilter.cpp.o
[356/519] Building CXX object src/CMakeFiles/common.dir/rpc/util.cpp.o
[357/519] Building CXX object src/CMakeFiles/server.dir/rpc/blockchain.cpp.o
[358/519] Building CXX object src/wallet/CMakeFiles/wallet.dir/context.cpp.o
[359/519] Building CXX object src/test/CMakeFiles/testutil.dir/util/mining.cpp.o
[360/519] Building CXX object src/CMakeFiles/script.dir/script/descriptor.cpp.o
[361/519] Building CXX object src/test/CMakeFiles/testutil.dir/util/wallet.cpp.o
[362/519] Linking CXX static library src/libscript.a
[363/519] Building CXX object src/CMakeFiles/bitcoin-cli.dir/bitcoin-cli.cpp.o
[364/519] Linking CXX static library src/libcommon.a
[365/519] Linking CXX shared library src/libbitcoinconsensus.so.0.25.7
[366/519] Creating library symlink src/libbitcoinconsensus.so.0 src/libbitcoinconsensus.so
[367/519] Building CXX object src/test/CMakeFiles/testutil.dir/util/net.cpp.o
[368/519] Linking CXX executable src/bitcoin-cli
[369/519] Building CXX object src/wallet/CMakeFiles/wallet.dir/db.cpp.o
[370/519] Building CXX object src/wallet/CMakeFiles/wallet.dir/coincontrol.cpp.o
[371/519] Building CXX object src/wallet/CMakeFiles/wallet.dir/crypter.cpp.o
[372/519] Building CXX object src/CMakeFiles/bitcoin-tx.dir/bitcoin-tx.cpp.o
[373/519] Linking CXX executable src/bitcoin-tx
[374/519] Building CXX object src/wallet/CMakeFiles/wallet.dir/coinselection.cpp.o
[375/519] Building CXX object src/wallet/CMakeFiles/wallet.dir/bdb.cpp.o
[376/519] Building CXX object src/test/CMakeFiles/testutil.dir/util/setup_common.cpp.o
[377/519] Building CXX object src/CMakeFiles/server.dir/validation.cpp.o
[378/519] Building CXX object src/wallet/CMakeFiles/wallet.dir/fees.cpp.o
[379/519] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/dns.cpp.o
[380/519] Building CXX object src/wallet/CMakeFiles/wallet.dir/sqlite.cpp.o
[381/519] Building CXX object src/wallet/CMakeFiles/wallet-tool.dir/wallettool.cpp.o
[382/519] Building CXX object src/wallet/CMakeFiles/wallet.dir/load.cpp.o
[383/519] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletutil.cpp.o
[384/519] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/options.cpp.o
[385/519] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/db.cpp.o
[386/519] Building CXX object src/wallet/CMakeFiles/wallet.dir/salvage.cpp.o
[387/519] Building CXX object src/seeder/CMakeFiles/bitcoin-seeder.dir/main.cpp.o
[388/519] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/bitcoin.cpp.o
[389/519] Building CXX object src/wallet/CMakeFiles/wallet.dir/__/interfaces/wallet.cpp.o
[390/519] Building CXX object src/wallet/CMakeFiles/wallet.dir/scriptpubkeyman.cpp.o
[391/519] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletdb.cpp.o
[392/519] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpcdump.cpp.o
[393/519] Building CXX object src/wallet/CMakeFiles/wallet.dir/wallet.cpp.o
[394/519] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpcwallet.cpp.o
[395/519] Linking CXX static library src/wallet/libwallet.a
[396/519] Linking CXX static library src/wallet/libwallet-tool.a
[397/519] Linking CXX executable src/bitcoin-wallet
ninja: build stopped: cannot make progress due to previous errors.
Build build-clang failed with exit code 1

Tail of the build log:

[339/517] Linking C static library src/secp256k1/libsecp256k1.a
[340/517] Building CXX object src/CMakeFiles/bitcoinconsensus.dir/pubkey.cpp.o
[341/517] Linking C executable src/secp256k1/internal-bench
[342/517] Linking C executable src/secp256k1/sign-bench
[343/517] Linking C executable src/secp256k1/verify-bench
[344/517] Linking C executable src/secp256k1/recover-bench
[345/517] Building CXX object src/CMakeFiles/bitcoinconsensus.dir/primitives/transaction.cpp.o
[346/517] Linking CXX static library src/libbitcoinconsensus.a
[347/517] Building CXX object src/test/CMakeFiles/testutil.dir/util/logging.cpp.o
[348/517] Building CXX object src/CMakeFiles/common.dir/rpc/rawtransaction_util.cpp.o
[349/517] Building CXX object src/test/CMakeFiles/testutil.dir/util/str.cpp.o
[350/517] Building C object src/secp256k1/CMakeFiles/ecmult-bench.dir/src/bench_ecmult.c.o
[351/517] Linking C executable src/secp256k1/ecmult-bench
[352/517] Building CXX object src/test/CMakeFiles/testutil.dir/util/transaction_utils.cpp.o
[353/517] Building CXX object src/CMakeFiles/bitcoin-wallet.dir/bitcoin-wallet.cpp.o
[354/517] Building CXX object src/CMakeFiles/common.dir/rpc/util.cpp.o
[355/517] Building CXX object src/CMakeFiles/bitcoin-cli.dir/bitcoin-cli.cpp.o
[356/517] Building CXX object src/wallet/CMakeFiles/wallet.dir/context.cpp.o
[357/517] Building CXX object src/CMakeFiles/script.dir/script/descriptor.cpp.o
[358/517] Linking CXX static library src/libscript.a
[359/517] Building CXX object src/test/CMakeFiles/testutil.dir/util/blockfilter.cpp.o
[360/517] Linking CXX static library src/libcommon.a
[361/517] Linking CXX shared library src/libbitcoinconsensus.so.0.25.7
[362/517] Creating library symlink src/libbitcoinconsensus.so.0 src/libbitcoinconsensus.so
[363/517] Linking CXX executable src/bitcoin-cli
[364/517] Building CXX object src/test/CMakeFiles/testutil.dir/util/mining.cpp.o
[365/517] Building CXX object src/CMakeFiles/bitcoin-tx.dir/bitcoin-tx.cpp.o
[366/517] Building CXX object src/test/CMakeFiles/testutil.dir/util/net.cpp.o
[367/517] Linking CXX executable src/bitcoin-tx
[368/517] Building CXX object src/wallet/CMakeFiles/wallet.dir/db.cpp.o
[369/517] Building CXX object src/test/CMakeFiles/testutil.dir/util/wallet.cpp.o
[370/517] Building CXX object src/wallet/CMakeFiles/wallet.dir/coinselection.cpp.o
[371/517] Building CXX object src/wallet/CMakeFiles/wallet.dir/coincontrol.cpp.o
[372/517] Building CXX object src/CMakeFiles/server.dir/validation.cpp.o
[373/517] Building CXX object src/wallet/CMakeFiles/wallet.dir/bdb.cpp.o
[374/517] Building CXX object src/wallet/CMakeFiles/wallet.dir/crypter.cpp.o
[375/517] Linking CXX static library src/zmq/libzmq.a
[376/517] Building CXX object src/wallet/CMakeFiles/wallet-tool.dir/wallettool.cpp.o
[377/517] Building CXX object src/test/CMakeFiles/testutil.dir/util/setup_common.cpp.o
[378/517] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/dns.cpp.o
[379/517] Building CXX object src/wallet/CMakeFiles/wallet.dir/sqlite.cpp.o
[380/517] Building CXX object src/wallet/CMakeFiles/wallet.dir/scriptpubkeyman.cpp.o
[381/517] Building CXX object src/wallet/CMakeFiles/wallet.dir/fees.cpp.o
[382/517] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletutil.cpp.o
[383/517] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/db.cpp.o
[384/517] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/options.cpp.o
[385/517] Building CXX object src/wallet/CMakeFiles/wallet.dir/load.cpp.o
[386/517] Building CXX object src/wallet/CMakeFiles/wallet.dir/salvage.cpp.o
[387/517] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/bitcoin.cpp.o
[388/517] Building CXX object src/seeder/CMakeFiles/bitcoin-seeder.dir/main.cpp.o
[389/517] Building CXX object src/wallet/CMakeFiles/wallet.dir/__/interfaces/wallet.cpp.o
[390/517] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletdb.cpp.o
[391/517] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpcdump.cpp.o
[392/517] Building CXX object src/wallet/CMakeFiles/wallet.dir/wallet.cpp.o
[393/517] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpcwallet.cpp.o
[394/517] Linking CXX static library src/wallet/libwallet.a
[395/517] Linking CXX static library src/wallet/libwallet-tool.a
[396/517] Linking CXX executable src/bitcoin-wallet
ninja: build stopped: cannot make progress due to previous errors.
Build build-clang-tidy failed with exit code 1
PiRK edited the summary of this revision. (Show Details)

squash with D11550, to avoid have introducing AnyPtr untested

Tail of the build log:

[388/519] Linking CXX static library src/libscript.a
[389/519] Linking CXX static library src/libcommon.a
[390/519] Linking CXX shared library src/libbitcoinconsensus.so.0.25.7
[391/519] Creating library symlink src/libbitcoinconsensus.so.0 src/libbitcoinconsensus.so
[392/519] Linking CXX executable src/bitcoin-cli
[393/519] Linking CXX executable src/bitcoin-tx
[394/519] Linking CXX static library src/wallet/libwallet.a
[395/519] Linking CXX static library src/wallet/libwallet-tool.a
[396/519] Linking CXX executable src/bitcoin-wallet
[397/519] Building CXX object src/CMakeFiles/server.dir/rpc/server.cpp.o
FAILED: src/CMakeFiles/server.dir/rpc/server.cpp.o 
/usr/bin/ccache /usr/bin/clang++ -DBOOST_AC_USE_STD_ATOMIC -DBOOST_SP_USE_STD_ATOMIC -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 -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/rpc/server.cpp.o -MF src/CMakeFiles/server.dir/rpc/server.cpp.o.d -o src/CMakeFiles/server.dir/rpc/server.cpp.o -c ../../src/rpc/server.cpp
In file included from ../../src/rpc/server.cpp:7:
In file included from ../../src/./rpc/server.h:10:
In file included from ../../src/./amount.h:10:
In file included from ../../src/./serialize.h:10:
In file included from ../../src/./prevector.h:8:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/algorithm:60:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/utility:70:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_pair.h:59:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/move.h:55:
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/type_traits:137:31: error: no member named 'value' in 'std::is_copy_constructible<JSONRPCRequest>'
    : public conditional<_B1::value, __and_<_B2, _B3, _Bn...>, _B1>::type
                         ~~~~~^
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/any:192:27: note: in instantiation of template class 'std::__and_<std::is_copy_constructible<JSONRPCRequest>, std::__not_<std::is_constructible<JSONRPCRequest, const JSONRPCRequest &>>, std::__not_<std::__is_in_place_type<JSONRPCRequest>>>' requested here
              enable_if_t<__and_<is_copy_constructible<_Tp>,
                          ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/any:196:7: note: while substituting prior template arguments into non-type template parameter [with _ValueType = const JSONRPCRequest &, _Tp = JSONRPCRequest, _Mgr = std::any::_Manager_external<JSONRPCRequest>]
      any(_ValueType&& __value)
      ^~~~~~~~~~~~~~~~~~~~~~~~~
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/type_traits:921:56: note: while substituting deduced template arguments into function template 'any' [with _ValueType = const JSONRPCRequest &, _Tp = (no value), _Mgr = (no value), $3 = (no value)]
      : public __bool_constant<__is_constructible(_Tp, _Args...)>
                                                       ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/type_traits:933:14: note: in instantiation of template class 'std::is_constructible<JSONRPCRequest, const JSONRPCRequest &>' requested here
    : public is_constructible<_Tp, const _Tp&>
             ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/type_traits:939:14: note: in instantiation of template class 'std::__is_copy_constructible_impl<JSONRPCRequest, true>' requested here
    : public __is_copy_constructible_impl<_Tp>
             ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/type_traits:132:26: note: (skipping 1 context in backtrace; use -ftemplate-backtrace-limit=0 to see all)
    : public conditional<_B1::value, _B2, _B1>::type
                         ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/any:170:17: note: in instantiation of template class 'std::__and_<std::is_copy_constructible<JSONRPCRequest>, std::is_constructible<JSONRPCRequest, const JSONRPCRequest &>>' requested here
      enable_if<__and_<is_copy_constructible<_Tp>,
                ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/any:175:5: note: in instantiation of template type alias '__any_constructible' requested here
    using __any_constructible_t =
    ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/any:181:56: note: in instantiation of template type alias '__any_constructible_t' requested here
              __any_constructible_t<_Tp, _ValueType&&> = true,
                                                       ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/any:183:7: note: while substituting prior template arguments into non-type template parameter [with _ValueType = const JSONRPCRequest &, _Tp = JSONRPCRequest, _Mgr = std::any::_Manager_external<JSONRPCRequest>]
      any(_ValueType&& __value)
      ^~~~~~~~~~~~~~~~~~~~~~~~~
../../src/rpc/server.cpp:130:25: note: while substituting deduced template arguments into function template 'any' [with _ValueType = const JSONRPCRequest &, _Tp = (no value), _Mgr = (no value), $3 = (no value), $4 = (no value)]
    JSONRPCRequest jreq(helpreq);
                        ^
1 error generated.
ninja: build stopped: cannot make progress due to previous errors.
Build build-clang failed with exit code 1

add missing change in server.cpp: copy-initialize the JSONRPCRequest objects.

(attempt 2)

Tail of the build log:

[339/517] Building CXX object src/CMakeFiles/bitcoinconsensus.dir/consensus/tx_check.cpp.o
[340/517] Building CXX object src/CMakeFiles/common.dir/rpc/util.cpp.o
[341/517] Building CXX object src/CMakeFiles/server.dir/validation.cpp.o
[342/517] Building CXX object src/CMakeFiles/bitcoin-wallet.dir/bitcoin-wallet.cpp.o
[343/517] Building CXX object src/CMakeFiles/script.dir/script/signingprovider.cpp.o
[344/517] Building CXX object src/test/CMakeFiles/testutil.dir/util/str.cpp.o
[345/517] Building C object src/secp256k1/CMakeFiles/ecmult-bench.dir/src/bench_ecmult.c.o
[346/517] Building C object src/secp256k1/CMakeFiles/internal-bench.dir/src/bench_internal.c.o
[347/517] Building CXX object src/CMakeFiles/bitcoin-cli.dir/bitcoin-cli.cpp.o
[348/517] Building C object src/secp256k1/CMakeFiles/secp256k1.dir/src/secp256k1.c.o
[349/517] Linking C static library src/secp256k1/libsecp256k1.a
[350/517] Linking CXX static library src/libbitcoinconsensus.a
[351/517] Building CXX object src/CMakeFiles/script.dir/script/descriptor.cpp.o
[352/517] Linking CXX static library src/libscript.a
[353/517] Linking C executable src/secp256k1/ecmult-bench
[354/517] Building CXX object src/test/CMakeFiles/testutil.dir/util/logging.cpp.o
[355/517] Linking CXX static library src/libcommon.a
[356/517] Linking C executable src/secp256k1/internal-bench
[357/517] Linking C executable src/secp256k1/sign-bench
[358/517] Linking CXX shared library src/libbitcoinconsensus.so.0.25.7
[359/517] Creating library symlink src/libbitcoinconsensus.so.0 src/libbitcoinconsensus.so
[360/517] Linking CXX executable src/bitcoin-cli
[361/517] Linking C executable src/secp256k1/verify-bench
[362/517] Linking C executable src/secp256k1/recover-bench
[363/517] Building CXX object src/wallet/CMakeFiles/wallet.dir/context.cpp.o
[364/517] Building CXX object src/test/CMakeFiles/testutil.dir/util/blockfilter.cpp.o
[365/517] Building CXX object src/test/CMakeFiles/testutil.dir/util/transaction_utils.cpp.o
[366/517] Building CXX object src/wallet/CMakeFiles/wallet.dir/db.cpp.o
[367/517] Building CXX object src/CMakeFiles/bitcoin-tx.dir/bitcoin-tx.cpp.o
[368/517] Linking CXX executable src/bitcoin-tx
[369/517] Building CXX object src/test/CMakeFiles/testutil.dir/util/mining.cpp.o
[370/517] Building CXX object src/test/CMakeFiles/testutil.dir/util/net.cpp.o
[371/517] Building CXX object src/wallet/CMakeFiles/wallet.dir/coincontrol.cpp.o
[372/517] Building CXX object src/wallet/CMakeFiles/wallet.dir/crypter.cpp.o
[373/517] Building CXX object src/wallet/CMakeFiles/wallet.dir/coinselection.cpp.o
[374/517] Building CXX object src/test/CMakeFiles/testutil.dir/util/wallet.cpp.o
[375/517] Building CXX object src/wallet/CMakeFiles/wallet.dir/bdb.cpp.o
[376/517] Building CXX object src/test/CMakeFiles/testutil.dir/util/setup_common.cpp.o
[377/517] Building CXX object src/wallet/CMakeFiles/wallet-tool.dir/wallettool.cpp.o
[378/517] Building CXX object src/wallet/CMakeFiles/wallet.dir/sqlite.cpp.o
[379/517] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/dns.cpp.o
[380/517] Building CXX object src/wallet/CMakeFiles/wallet.dir/fees.cpp.o
[381/517] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletutil.cpp.o
[382/517] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/db.cpp.o
[383/517] Building CXX object src/wallet/CMakeFiles/wallet.dir/load.cpp.o
[384/517] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/options.cpp.o
[385/517] Building CXX object src/wallet/CMakeFiles/wallet.dir/__/interfaces/wallet.cpp.o
[386/517] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/bitcoin.cpp.o
[387/517] Building CXX object src/wallet/CMakeFiles/wallet.dir/salvage.cpp.o
[388/517] Building CXX object src/seeder/CMakeFiles/bitcoin-seeder.dir/main.cpp.o
[389/517] Building CXX object src/wallet/CMakeFiles/wallet.dir/scriptpubkeyman.cpp.o
[390/517] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletdb.cpp.o
[391/517] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpcdump.cpp.o
[392/517] Building CXX object src/wallet/CMakeFiles/wallet.dir/wallet.cpp.o
[393/517] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpcwallet.cpp.o
[394/517] Linking CXX static library src/wallet/libwallet.a
[395/517] Linking CXX static library src/wallet/libwallet-tool.a
[396/517] Linking CXX executable src/bitcoin-wallet
ninja: build stopped: cannot make progress due to previous errors.
Build build-clang-tidy failed with exit code 1

Tail of the build log:

[388/519] Building CXX object src/seeder/CMakeFiles/bitcoin-seeder.dir/main.cpp.o
[389/519] Linking CXX static library src/libcommon.a
[390/519] Linking CXX shared library src/libbitcoinconsensus.so.0.25.7
[391/519] Creating library symlink src/libbitcoinconsensus.so.0 src/libbitcoinconsensus.so
[392/519] Linking CXX executable src/bitcoin-cli
[393/519] Linking CXX executable src/bitcoin-tx
[394/519] Linking CXX static library src/wallet/libwallet.a
[395/519] Linking CXX static library src/wallet/libwallet-tool.a
[396/519] Linking CXX executable src/bitcoin-wallet
[397/519] Building CXX object src/CMakeFiles/server.dir/rpc/server.cpp.o
FAILED: src/CMakeFiles/server.dir/rpc/server.cpp.o 
/usr/bin/ccache /usr/bin/clang++ -DBOOST_AC_USE_STD_ATOMIC -DBOOST_SP_USE_STD_ATOMIC -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 -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/rpc/server.cpp.o -MF src/CMakeFiles/server.dir/rpc/server.cpp.o.d -o src/CMakeFiles/server.dir/rpc/server.cpp.o -c ../../src/rpc/server.cpp
In file included from ../../src/rpc/server.cpp:7:
In file included from ../../src/./rpc/server.h:10:
In file included from ../../src/./amount.h:10:
In file included from ../../src/./serialize.h:10:
In file included from ../../src/./prevector.h:8:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/algorithm:60:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/utility:70:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_pair.h:59:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/move.h:55:
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/type_traits:137:31: error: no member named 'value' in 'std::is_copy_constructible<JSONRPCRequest>'
    : public conditional<_B1::value, __and_<_B2, _B3, _Bn...>, _B1>::type
                         ~~~~~^
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/any:192:27: note: in instantiation of template class 'std::__and_<std::is_copy_constructible<JSONRPCRequest>, std::__not_<std::is_constructible<JSONRPCRequest, const JSONRPCRequest &>>, std::__not_<std::__is_in_place_type<JSONRPCRequest>>>' requested here
              enable_if_t<__and_<is_copy_constructible<_Tp>,
                          ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/any:196:7: note: while substituting prior template arguments into non-type template parameter [with _ValueType = const JSONRPCRequest &, _Tp = JSONRPCRequest, _Mgr = std::any::_Manager_external<JSONRPCRequest>]
      any(_ValueType&& __value)
      ^~~~~~~~~~~~~~~~~~~~~~~~~
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/type_traits:921:56: note: while substituting deduced template arguments into function template 'any' [with _ValueType = const JSONRPCRequest &, _Tp = (no value), _Mgr = (no value), $3 = (no value)]
      : public __bool_constant<__is_constructible(_Tp, _Args...)>
                                                       ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/type_traits:933:14: note: in instantiation of template class 'std::is_constructible<JSONRPCRequest, const JSONRPCRequest &>' requested here
    : public is_constructible<_Tp, const _Tp&>
             ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/type_traits:939:14: note: in instantiation of template class 'std::__is_copy_constructible_impl<JSONRPCRequest, true>' requested here
    : public __is_copy_constructible_impl<_Tp>
             ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/type_traits:132:26: note: (skipping 1 context in backtrace; use -ftemplate-backtrace-limit=0 to see all)
    : public conditional<_B1::value, _B2, _B1>::type
                         ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/any:170:17: note: in instantiation of template class 'std::__and_<std::is_copy_constructible<JSONRPCRequest>, std::is_constructible<JSONRPCRequest, const JSONRPCRequest &>>' requested here
      enable_if<__and_<is_copy_constructible<_Tp>,
                ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/any:175:5: note: in instantiation of template type alias '__any_constructible' requested here
    using __any_constructible_t =
    ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/any:181:56: note: in instantiation of template type alias '__any_constructible_t' requested here
              __any_constructible_t<_Tp, _ValueType&&> = true,
                                                       ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/any:183:7: note: while substituting prior template arguments into non-type template parameter [with _ValueType = const JSONRPCRequest &, _Tp = JSONRPCRequest, _Mgr = std::any::_Manager_external<JSONRPCRequest>]
      any(_ValueType&& __value)
      ^~~~~~~~~~~~~~~~~~~~~~~~~
../../src/rpc/server.cpp:130:27: note: while substituting deduced template arguments into function template 'any' [with _ValueType = const JSONRPCRequest &, _Tp = (no value), _Mgr = (no value), $3 = (no value), $4 = (no value)]
    JSONRPCRequest jreq = helpreq;
                          ^
1 error generated.
ninja: build stopped: cannot make progress due to previous errors.
Build build-clang failed with exit code 1

Tail of the build log:

[339/517] Building C object src/secp256k1/CMakeFiles/recover-bench.dir/src/bench_recover.c.o
[340/517] Building C object src/secp256k1/CMakeFiles/ecmult-bench.dir/src/bench_ecmult.c.o
[341/517] Building C object src/secp256k1/CMakeFiles/internal-bench.dir/src/bench_internal.c.o
[342/517] Building C object src/secp256k1/CMakeFiles/verify-bench.dir/src/bench_verify.c.o
[343/517] Building CXX object src/CMakeFiles/script.dir/script/sigencoding.cpp.o
[344/517] Building C object src/secp256k1/CMakeFiles/secp256k1.dir/src/secp256k1.c.o
[345/517] Linking C static library src/secp256k1/libsecp256k1.a
[346/517] Building CXX object src/CMakeFiles/bitcoinconsensus.dir/consensus/tx_check.cpp.o
[347/517] Linking C executable src/secp256k1/ecmult-bench
[348/517] Linking C executable src/secp256k1/internal-bench
[349/517] Linking C executable src/secp256k1/sign-bench
[350/517] Linking C executable src/secp256k1/verify-bench
[351/517] Linking C executable src/secp256k1/recover-bench
[352/517] Building CXX object src/test/CMakeFiles/testutil.dir/util/str.cpp.o
[353/517] Building CXX object src/CMakeFiles/bitcoin-wallet.dir/bitcoin-wallet.cpp.o
[354/517] Building CXX object src/CMakeFiles/bitcoinconsensus.dir/primitives/transaction.cpp.o
[355/517] Linking CXX static library src/libbitcoinconsensus.a
[356/517] Linking CXX static library src/libscript.a
[357/517] Building CXX object src/CMakeFiles/bitcoin-tx.dir/bitcoin-tx.cpp.o
[358/517] Building CXX object src/test/CMakeFiles/testutil.dir/util/logging.cpp.o
[359/517] Linking CXX static library src/libcommon.a
[360/517] Building CXX object src/wallet/CMakeFiles/wallet.dir/context.cpp.o
[361/517] Linking CXX shared library src/libbitcoinconsensus.so.0.25.7
[362/517] Creating library symlink src/libbitcoinconsensus.so.0 src/libbitcoinconsensus.so
[363/517] Linking CXX executable src/bitcoin-cli
[364/517] Linking CXX executable src/bitcoin-tx
[365/517] Building CXX object src/test/CMakeFiles/testutil.dir/util/transaction_utils.cpp.o
[366/517] Building CXX object src/test/CMakeFiles/testutil.dir/util/blockfilter.cpp.o
[367/517] Building CXX object src/wallet/CMakeFiles/wallet.dir/bdb.cpp.o
[368/517] Building CXX object src/wallet/CMakeFiles/wallet.dir/coinselection.cpp.o
[369/517] Building CXX object src/test/CMakeFiles/testutil.dir/util/mining.cpp.o
[370/517] Building CXX object src/wallet/CMakeFiles/wallet.dir/coincontrol.cpp.o
[371/517] Building CXX object src/test/CMakeFiles/testutil.dir/util/net.cpp.o
[372/517] Building CXX object src/wallet/CMakeFiles/wallet.dir/db.cpp.o
[373/517] Building CXX object src/test/CMakeFiles/testutil.dir/util/wallet.cpp.o
[374/517] Building CXX object src/wallet/CMakeFiles/wallet.dir/crypter.cpp.o
[375/517] Building CXX object src/test/CMakeFiles/testutil.dir/util/setup_common.cpp.o
[376/517] Building CXX object src/wallet/CMakeFiles/wallet-tool.dir/wallettool.cpp.o
[377/517] Building CXX object src/wallet/CMakeFiles/wallet.dir/sqlite.cpp.o
[378/517] Building CXX object src/wallet/CMakeFiles/wallet.dir/__/interfaces/wallet.cpp.o
[379/517] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/dns.cpp.o
[380/517] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletutil.cpp.o
[381/517] Building CXX object src/wallet/CMakeFiles/wallet.dir/fees.cpp.o
[382/517] Building CXX object src/wallet/CMakeFiles/wallet.dir/load.cpp.o
[383/517] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/db.cpp.o
[384/517] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/options.cpp.o
[385/517] Building CXX object src/wallet/CMakeFiles/wallet.dir/salvage.cpp.o
[386/517] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/bitcoin.cpp.o
[387/517] Building CXX object src/seeder/CMakeFiles/bitcoin-seeder.dir/main.cpp.o
[388/517] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpcdump.cpp.o
[389/517] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpcwallet.cpp.o
[390/517] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletdb.cpp.o
[391/517] Building CXX object src/wallet/CMakeFiles/wallet.dir/wallet.cpp.o
[392/517] Building CXX object src/CMakeFiles/server.dir/net_processing.cpp.o
[393/517] Building CXX object src/wallet/CMakeFiles/wallet.dir/scriptpubkeyman.cpp.o
[394/517] Linking CXX static library src/wallet/libwallet.a
[395/517] Linking CXX static library src/wallet/libwallet-tool.a
[396/517] Linking CXX executable src/bitcoin-wallet
ninja: build stopped: cannot make progress due to previous errors.
Build build-clang-tidy failed with exit code 1
PiRK planned changes to this revision.Jun 1 2022, 15:49

I'm going to need to find a way to reproduce this error locally before I can fix it.

I don't get it. It works for Core, it works on my computer (tested with clang-11 and clang-14).
I also tried backporting https://github.com/bitcoin/bitcoin/pull/21574 first, because that would make the issue go away, but that lead me to other weird C++ issues.

PiRK edited the summary of this revision. (Show Details)

rebase onto D11557: make JSONRPCRequest ctor explicit to avoid calling the conversion ctor

Fabien requested changes to this revision.Jun 2 2022, 19:35
Fabien added a subscriber: Fabien.
Fabien added inline comments.
src/bitcoind.cpp
22 ↗(On Diff #33790)

You need util/check.h for Assert like the source material

src/httprpc.h
13 ↗(On Diff #33790)

Macro likestamp:

src/interfaces/node.cpp
40 ↗(On Diff #33790)

move below 3rd party libs

src/qt/bitcoin.cpp
778 ↗(On Diff #33790)

include <any>

src/qt/test/apptests.cpp
25 ↗(On Diff #33790)

wrong place

src/rest.cpp
27 ↗(On Diff #33790)

Dito

src/rpc/blockchain.h
8 ↗(On Diff #33790)

Dito

src/rpc/request.h
11 ↗(On Diff #33790)

This one is not where it belongs

src/test/rpc_tests.cpp
18 ↗(On Diff #33790)

Dito

This revision now requires changes to proceed.Jun 2 2022, 19:35

Address review: include util/check.h in bitcoind.cpp, consistently move stdlib includes after third-party includes

This revision is now accepted and ready to land.Jun 3 2022, 11:12