mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-13 15:39:05 +01:00
[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.
This commit is contained in:
@@ -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
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user