Page MenuHomePhabricator

refactor: Create interfaces earlier during initialization
ClosedPublic

Authored by PiRK on Sep 17 2021, 08:10.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABCf70965d1ae5b: refactor: Create interfaces earlier during initialization
Summary

Add AppInitInterfaces function so wallet chain and chain client interfaces are
created earlier during initialization. This is needed in the next commit to
allow the gui splash screen to be able to register for wallet events through a
dedicated WalletClient interface instead managing wallets indirectly through
the Node interface. This only works if the wallet client interface is created
before the splash screen needs to use it.

This is a backport of core#19099 [1/3]
https://github.com/bitcoin/bitcoin/pull/19099/commits/b266b3e0bf29d0f3d5deaeec62d57c5025b35525

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.Sep 17 2021, 08:10

remove #include <support/allocators/secure.h> in dummywallet.cpp (missed line during the backport)

Tail of the build log:

[315/456] Building CXX object src/CMakeFiles/server.dir/node/ui_interface.cpp.o
[316/456] Building CXX object src/CMakeFiles/server.dir/script/scriptcache.cpp.o
[317/456] Building CXX object src/CMakeFiles/server.dir/rest.cpp.o
[318/456] Building CXX object src/CMakeFiles/server.dir/timedata.cpp.o
[319/456] Building CXX object src/CMakeFiles/server.dir/script/sigcache.cpp.o
[320/456] Building CXX object src/CMakeFiles/server.dir/rpc/misc.cpp.o
[321/456] Building CXX object src/CMakeFiles/server.dir/rpc/avalanche.cpp.o
[322/456] Building CXX object src/CMakeFiles/server.dir/rpc/server.cpp.o
[323/456] Building CXX object src/CMakeFiles/server.dir/rpc/net.cpp.o
[324/456] Building CXX object src/CMakeFiles/server.dir/txdb.cpp.o
[325/456] Building C object src/secp256k1/CMakeFiles/sign-bench.dir/src/bench_sign.c.o
[326/456] Building CXX object src/CMakeFiles/server.dir/versionbits.cpp.o
[327/456] Building CXX object src/CMakeFiles/server.dir/rpc/mining.cpp.o
[328/456] Building C object src/secp256k1/CMakeFiles/recover-bench.dir/src/bench_recover.c.o
[329/456] Building CXX object src/CMakeFiles/server.dir/dummywallet.cpp.o
FAILED: src/CMakeFiles/server.dir/dummywallet.cpp.o 
/usr/bin/ccache /usr/bin/c++  -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-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 -Woverloaded-virtual -Wno-unused-parameter -Wno-implicit-fallthrough -pthread -std=gnu++17 -MD -MT src/CMakeFiles/server.dir/dummywallet.cpp.o -MF src/CMakeFiles/server.dir/dummywallet.cpp.o.d -o src/CMakeFiles/server.dir/dummywallet.cpp.o -c ../../src/dummywallet.cpp
../../src/dummywallet.cpp:66:41: error: ‘SecureString’ does not name a type; did you mean ‘ToString’?
                                   const SecureString &passphrase,
                                         ^~~~~~~~~~~~
                                         ToString
[330/456] Building C object src/secp256k1/CMakeFiles/verify-bench.dir/src/bench_verify.c.o
[331/456] Building CXX object src/CMakeFiles/server.dir/init.cpp.o
[332/456] Building CXX object src/CMakeFiles/server.dir/validationinterface.cpp.o
[333/456] Building C object src/secp256k1/CMakeFiles/ecmult-bench.dir/src/bench_ecmult.c.o
[334/456] Building C object src/secp256k1/CMakeFiles/internal-bench.dir/src/bench_internal.c.o
[335/456] Building CXX object src/test/CMakeFiles/testutil.dir/util/str.cpp.o
[336/456] Building C object src/secp256k1/CMakeFiles/secp256k1.dir/src/secp256k1.c.o
[337/456] Linking C static library src/secp256k1/libsecp256k1.a
[338/456] Building CXX object src/CMakeFiles/server.dir/net_processing.cpp.o
[339/456] Linking C executable src/secp256k1/ecmult-bench
[340/456] Building CXX object src/test/CMakeFiles/testutil.dir/util/logging.cpp.o
[341/456] Linking C executable src/secp256k1/internal-bench
[342/456] Linking C executable src/secp256k1/sign-bench
[343/456] Linking C executable src/secp256k1/verify-bench
[344/456] Linking C executable src/secp256k1/recover-bench
[345/456] Linking CXX static library src/libcommon.a
[346/456] Linking CXX static library src/libscript.a
[347/456] Linking CXX static library src/libbitcoinconsensus.a
[348/456] Linking CXX shared library src/libbitcoinconsensus.so.0.24.2
[349/456] Building CXX object src/CMakeFiles/server.dir/torcontrol.cpp.o
[350/456] Creating library symlink src/libbitcoinconsensus.so.0 src/libbitcoinconsensus.so
[351/456] Linking CXX executable src/bitcoin-cli
[352/456] Linking CXX executable src/bitcoin-tx
[353/456] Building CXX object src/test/CMakeFiles/testutil.dir/util/wallet.cpp.o
[354/456] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/dns.cpp.o
[355/456] Building CXX object src/test/CMakeFiles/testutil.dir/util/blockfilter.cpp.o
[356/456] Building CXX object src/test/CMakeFiles/testutil.dir/util/transaction_utils.cpp.o
[357/456] Building CXX object src/test/CMakeFiles/testutil.dir/util/mining.cpp.o
[358/456] Building CXX object src/test/CMakeFiles/testutil.dir/util/net.cpp.o
[359/456] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/db.cpp.o
[360/456] Building CXX object src/CMakeFiles/server.dir/txmempool.cpp.o
[361/456] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/bitcoin.cpp.o
[362/456] Building CXX object src/seeder/CMakeFiles/bitcoin-seeder.dir/main.cpp.o
[363/456] Building CXX object src/test/CMakeFiles/testutil.dir/util/setup_common.cpp.o
[364/456] Building CXX object src/CMakeFiles/server.dir/rpc/rawtransaction.cpp.o
[365/456] Building CXX object src/CMakeFiles/server.dir/rpc/blockchain.cpp.o
[366/456] Building CXX object src/CMakeFiles/server.dir/validation.cpp.o
ninja: build stopped: cannot make progress due to previous errors.
Build build-without-wallet failed with exit code 1
Fabien requested changes to this revision.Sep 17 2021, 09:09
Fabien added a subscriber: Fabien.

Tests are broken

This revision now requires changes to proceed.Sep 17 2021, 09:09

I removed the include in the wrong commit. Put it back, and remove it in D10141.

This revision is now accepted and ready to land.Sep 19 2021, 04:57