aboutsummaryrefslogtreecommitdiff
path: root/src/bitcoind.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/bitcoind.cpp
parentcaaf9722f3200775cf37aab6b911a7054b2378e7 (diff)
downloadbitcoin-49baa4a462193d8d82b51d464740aa5f1114edf1.tar.xz
[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/bitcoind.cpp')
-rw-r--r--src/bitcoind.cpp8
1 files changed, 8 insertions, 0 deletions
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 <httpserver.h>
#include <httprpc.h>
#include <utilstrencodings.h>
+#if ENABLE_WALLET
+#include <wallet/init.h>
+#include <walletinitinterface.h>
+#endif
#include <boost/thread.hpp>
@@ -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
//