aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/init.h
diff options
context:
space:
mode:
authorJohn Newbery <john@johnnewbery.com>2017-07-06 11:16:40 +0100
committerJohn Newbery <john@johnnewbery.com>2018-03-26 13:18:06 -0400
commit5fb54210a68612ebcc47b2b12048d192a529d3d7 (patch)
treee4af76d10881d2b71d0ed8f4deb7d4b33fe14bcd /src/wallet/init.h
parentffc6e48b2983189dc0ce7de0a038e5329bc07b1b (diff)
downloadbitcoin-5fb54210a68612ebcc47b2b12048d192a529d3d7.tar.xz
[wallet] Move wallet init functions into WalletInit class.
Diffstat (limited to 'src/wallet/init.h')
-rw-r--r--src/wallet/init.h44
1 files changed, 24 insertions, 20 deletions
diff --git a/src/wallet/init.h b/src/wallet/init.h
index 0b3ee2dda2..e6c9ffb05b 100644
--- a/src/wallet/init.h
+++ b/src/wallet/init.h
@@ -11,33 +11,37 @@
class CRPCTable;
class CScheduler;
-//! Return the wallets help message.
-std::string GetWalletHelpString(bool showDebug);
+class WalletInit {
+public:
-//! Wallets parameter interaction
-bool WalletParameterInteraction();
+ //! Return the wallets help message.
+ static std::string GetHelpString(bool showDebug);
-//! Register wallet RPCs.
-void RegisterWalletRPC(CRPCTable &tableRPC);
+ //! Wallets parameter interaction
+ static bool ParameterInteraction();
-//! 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.
+ static void RegisterRPC(CRPCTable &tableRPC);
-//! 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).
+ static bool Verify();
-//! Complete startup of wallets.
-void StartWallets(CScheduler& scheduler);
+ //! Load wallet databases.
+ static bool Open();
-//! Flush all wallets in preparation for shutdown.
-void FlushWallets();
+ //! Complete startup of wallets.
+ static void Start(CScheduler& scheduler);
-//! Stop all wallets. Wallets will be flushed first.
-void StopWallets();
+ //! Flush all wallets in preparation for shutdown.
+ static void Flush();
-//! Close all wallets.
-void CloseWallets();
+ //! Stop all wallets. Wallets will be flushed first.
+ static void Stop();
+
+ //! Close all wallets.
+ static void Close();
+};
#endif // BITCOIN_WALLET_INIT_H