2017-08-02 11:19:28 +00:00
|
|
|
// Copyright (c) 2009-2010 Satoshi Nakamoto
|
|
|
|
// Copyright (c) 2009-2017 The Bitcoin Core developers
|
|
|
|
// Distributed under the MIT software license, see the accompanying
|
|
|
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
|
|
|
|
|
|
#ifndef BITCOIN_WALLET_INIT_H
|
|
|
|
#define BITCOIN_WALLET_INIT_H
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
2017-08-28 17:33:59 +00:00
|
|
|
class CRPCTable;
|
2017-08-29 15:47:06 +00:00
|
|
|
class CScheduler;
|
2017-08-28 17:33:59 +00:00
|
|
|
|
2017-08-02 11:19:28 +00:00
|
|
|
//! Return the wallets help message.
|
|
|
|
std::string GetWalletHelpString(bool showDebug);
|
|
|
|
|
|
|
|
//! Wallets parameter interaction
|
|
|
|
bool WalletParameterInteraction();
|
|
|
|
|
2017-08-28 17:33:59 +00:00
|
|
|
//! Register wallet RPCs.
|
|
|
|
void RegisterWalletRPC(CRPCTable &tableRPC);
|
|
|
|
|
2017-08-02 11:19:28 +00:00
|
|
|
//! 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
|
2017-09-07 23:22:11 +00:00
|
|
|
// being loaded (WalletParameterInteraction forbids -salvagewallet, -zapwallettxes or -upgradewallet with multiwallet).
|
2017-08-29 15:51:02 +00:00
|
|
|
bool VerifyWallets();
|
2017-08-02 11:19:28 +00:00
|
|
|
|
|
|
|
//! Load wallet databases.
|
2017-08-29 15:48:25 +00:00
|
|
|
bool OpenWallets();
|
2017-08-02 11:19:28 +00:00
|
|
|
|
2017-08-29 15:47:06 +00:00
|
|
|
//! Complete startup of wallets.
|
|
|
|
void StartWallets(CScheduler& scheduler);
|
|
|
|
|
2017-08-28 16:31:53 +00:00
|
|
|
//! Flush all wallets in preparation for shutdown.
|
2017-08-28 16:53:56 +00:00
|
|
|
void FlushWallets();
|
|
|
|
|
|
|
|
//! Stop all wallets. Wallets will be flushed first.
|
|
|
|
void StopWallets();
|
2017-08-28 16:41:33 +00:00
|
|
|
|
|
|
|
//! Close all wallets.
|
|
|
|
void CloseWallets();
|
|
|
|
|
2017-08-02 11:19:28 +00:00
|
|
|
#endif // BITCOIN_WALLET_INIT_H
|