aboutsummaryrefslogtreecommitdiff
path: root/src/qt/bitcoin.cpp
diff options
context:
space:
mode:
authorJohn Newbery <john@johnnewbery.com>2018-02-21 11:38:53 -0500
committerJohn Newbery <john@johnnewbery.com>2018-03-27 14:48:48 -0400
commit49baa4a462193d8d82b51d464740aa5f1114edf1 (patch)
treeeaa2de9eabbd59e6cf28360493aec5d3c4c39e84 /src/qt/bitcoin.cpp
parentcaaf9722f3200775cf37aab6b911a7054b2378e7 (diff)
[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.
Diffstat (limited to 'src/qt/bitcoin.cpp')
-rw-r--r--src/qt/bitcoin.cpp5
1 files changed, 5 insertions, 0 deletions
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 <warnings.h>
#ifdef ENABLE_WALLET
+#include <wallet/init.h>
#include <wallet/wallet.h>
+#include <walletinitinterface.h>
#endif
#include <stdint.h>
@@ -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