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/qt/bitcoin.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/qt') diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp index 06e1f1a37c..e6a2af5f6c 100644 --- a/src/qt/bitcoin.cpp +++ b/src/qt/bitcoin.cpp @@ -33,7 +33,9 @@ #include #ifdef ENABLE_WALLET +#include #include +#include #endif #include @@ -669,6 +671,9 @@ int main(int argc, char *argv[]) // Start up the payment server early, too, so impatient users that click on // bitcoin: links repeatedly have their payment requests routed to this process: app.createPaymentServer(); + + // Hook up the wallet init interface + g_wallet_init_interface.reset(new WalletInit); #endif /// 9. Main GUI initialization -- 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/qt/bitcoin.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/qt') diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp index e6a2af5f6c..cb2e6aac95 100644 --- a/src/qt/bitcoin.cpp +++ b/src/qt/bitcoin.cpp @@ -35,8 +35,8 @@ #ifdef ENABLE_WALLET #include #include -#include #endif +#include #include @@ -674,6 +674,8 @@ int main(int argc, char *argv[]) // Hook up the wallet init interface g_wallet_init_interface.reset(new WalletInit); +#else + g_wallet_init_interface.reset(new DummyWalletInit); #endif /// 9. Main GUI initialization -- cgit v1.2.3