diff options
author | John Newbery <john@johnnewbery.com> | 2018-02-21 11:38:53 -0500 |
---|---|---|
committer | John Newbery <john@johnnewbery.com> | 2018-03-27 14:48:48 -0400 |
commit | 49baa4a462193d8d82b51d464740aa5f1114edf1 (patch) | |
tree | eaa2de9eabbd59e6cf28360493aec5d3c4c39e84 /src/wallet | |
parent | caaf9722f3200775cf37aab6b911a7054b2378e7 (diff) | |
download | bitcoin-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/wallet')
-rw-r--r-- | src/wallet/init.h | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/wallet/init.h b/src/wallet/init.h index e6c9ffb05b..f8be90d3e3 100644 --- a/src/wallet/init.h +++ b/src/wallet/init.h @@ -6,42 +6,43 @@ #ifndef BITCOIN_WALLET_INIT_H #define BITCOIN_WALLET_INIT_H +#include <walletinitinterface.h> #include <string> class CRPCTable; class CScheduler; -class WalletInit { +class WalletInit : public WalletInitInterface { public: //! Return the wallets help message. - static std::string GetHelpString(bool showDebug); + std::string GetHelpString(bool showDebug) override; //! Wallets parameter interaction - static bool ParameterInteraction(); + bool ParameterInteraction() override; //! Register wallet RPCs. - static void RegisterRPC(CRPCTable &tableRPC); + void RegisterRPC(CRPCTable &tableRPC) override; //! Responsible for reading and validating the -wallet arguments and verifying the wallet database. // This function will perform salvage on the wallet if requested, as long as only one wallet is // being loaded (WalletParameterInteraction forbids -salvagewallet, -zapwallettxes or -upgradewallet with multiwallet). - static bool Verify(); + bool Verify() override; //! Load wallet databases. - static bool Open(); + bool Open() override; //! Complete startup of wallets. - static void Start(CScheduler& scheduler); + void Start(CScheduler& scheduler) override; //! Flush all wallets in preparation for shutdown. - static void Flush(); + void Flush() override; //! Stop all wallets. Wallets will be flushed first. - static void Stop(); + void Stop() override; //! Close all wallets. - static void Close(); + void Close() override; }; #endif // BITCOIN_WALLET_INIT_H |