From 49baa4a462193d8d82b51d464740aa5f1114edf1 Mon Sep 17 00:00:00 2001 From: John Newbery Date: Wed, 21 Feb 2018 11:38:53 -0500 Subject: [wallet] Use global g_wallet_init_interface to init/destroy the wallet. This commit creates a global g_wallet_init_interface, which is created in bitcoind and bitcoin-qt. g_wallet_init_interface is used to init and destroy the wallet. This removes the dependency from init.cpp on the wallet library. --- src/bitcoind.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/bitcoind.cpp') diff --git a/src/bitcoind.cpp b/src/bitcoind.cpp index d3eb60725f..a849683eb0 100644 --- a/src/bitcoind.cpp +++ b/src/bitcoind.cpp @@ -18,6 +18,10 @@ #include #include #include +#if ENABLE_WALLET +#include +#include +#endif #include @@ -59,6 +63,10 @@ bool AppInit(int argc, char* argv[]) { bool fRet = false; +#if ENABLE_WALLET + g_wallet_init_interface.reset(new WalletInit); +#endif + // // Parameters // -- cgit v1.2.3 From c7ec5243892c38f9f77781b0e24a237942e7c776 Mon Sep 17 00:00:00 2001 From: John Newbery Date: Tue, 27 Mar 2018 15:35:54 -0400 Subject: [wallet] Add dummy wallet init class --- src/bitcoind.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/bitcoind.cpp') diff --git a/src/bitcoind.cpp b/src/bitcoind.cpp index a849683eb0..5eba1cbeb9 100644 --- a/src/bitcoind.cpp +++ b/src/bitcoind.cpp @@ -20,8 +20,8 @@ #include #if ENABLE_WALLET #include -#include #endif +#include #include @@ -65,6 +65,8 @@ bool AppInit(int argc, char* argv[]) #if ENABLE_WALLET g_wallet_init_interface.reset(new WalletInit); +#else + g_wallet_init_interface.reset(new DummyWalletInit); #endif // -- cgit v1.2.3