diff options
Diffstat (limited to 'src/wallet/init.h')
-rw-r--r-- | src/wallet/init.h | 45 |
1 files changed, 25 insertions, 20 deletions
diff --git a/src/wallet/init.h b/src/wallet/init.h index 0b3ee2dda2..f8be90d3e3 100644 --- a/src/wallet/init.h +++ b/src/wallet/init.h @@ -6,38 +6,43 @@ #ifndef BITCOIN_WALLET_INIT_H #define BITCOIN_WALLET_INIT_H +#include <walletinitinterface.h> #include <string> class CRPCTable; class CScheduler; -//! Return the wallets help message. -std::string GetWalletHelpString(bool showDebug); +class WalletInit : public WalletInitInterface { +public: -//! Wallets parameter interaction -bool WalletParameterInteraction(); + //! Return the wallets help message. + std::string GetHelpString(bool showDebug) override; -//! Register wallet RPCs. -void RegisterWalletRPC(CRPCTable &tableRPC); + //! Wallets parameter interaction + bool ParameterInteraction() 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). -bool VerifyWallets(); + //! Register wallet RPCs. + void RegisterRPC(CRPCTable &tableRPC) override; -//! Load wallet databases. -bool OpenWallets(); + //! 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). + bool Verify() override; -//! Complete startup of wallets. -void StartWallets(CScheduler& scheduler); + //! Load wallet databases. + bool Open() override; -//! Flush all wallets in preparation for shutdown. -void FlushWallets(); + //! Complete startup of wallets. + void Start(CScheduler& scheduler) override; -//! Stop all wallets. Wallets will be flushed first. -void StopWallets(); + //! Flush all wallets in preparation for shutdown. + void Flush() override; -//! Close all wallets. -void CloseWallets(); + //! Stop all wallets. Wallets will be flushed first. + void Stop() override; + + //! Close all wallets. + void Close() override; +}; #endif // BITCOIN_WALLET_INIT_H |