2017-08-02 07:19:28 -04: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 13:33:59 -04:00
|
|
|
class CRPCTable;
|
2017-08-29 11:47:06 -04:00
|
|
|
class CScheduler;
|
2017-08-28 13:33:59 -04:00
|
|
|
|
2017-08-02 07:19:28 -04:00
|
|
|
//! Return the wallets help message.
|
|
|
|
std::string GetWalletHelpString(bool showDebug);
|
|
|
|
|
|
|
|
//! Wallets parameter interaction
|
|
|
|
bool WalletParameterInteraction();
|
|
|
|
|
2017-08-28 13:33:59 -04:00
|
|
|
//! Register wallet RPCs.
|
|
|
|
void RegisterWalletRPC(CRPCTable &tableRPC);
|
|
|
|
|
2017-08-02 07:19:28 -04: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 16:22:11 -07:00
|
|
|
// being loaded (WalletParameterInteraction forbids -salvagewallet, -zapwallettxes or -upgradewallet with multiwallet).
|
2017-08-29 11:51:02 -04:00
|
|
|
bool VerifyWallets();
|
2017-08-02 07:19:28 -04:00
|
|
|
|
|
|
|
//! Load wallet databases.
|
2017-08-29 11:48:25 -04:00
|
|
|
bool OpenWallets();
|
2017-08-02 07:19:28 -04:00
|
|
|
|
2017-08-29 11:47:06 -04:00
|
|
|
//! Complete startup of wallets.
|
|
|
|
void StartWallets(CScheduler& scheduler);
|
|
|
|
|
2017-08-28 12:31:53 -04:00
|
|
|
//! Flush all wallets in preparation for shutdown.
|
2017-08-28 12:53:56 -04:00
|
|
|
void FlushWallets();
|
|
|
|
|
|
|
|
//! Stop all wallets. Wallets will be flushed first.
|
|
|
|
void StopWallets();
|
2017-08-28 12:41:33 -04:00
|
|
|
|
|
|
|
//! Close all wallets.
|
|
|
|
void CloseWallets();
|
|
|
|
|
2017-08-02 07:19:28 -04:00
|
|
|
#endif // BITCOIN_WALLET_INIT_H
|