1 // Copyright (c) 2009-2010 Satoshi Nakamoto 2 // Copyright (c) 2009-2019 The Bitcoin Core developers 3 // Distributed under the MIT software license, see the accompanying 4 // file COPYING or http://www.opensource.org/licenses/mit-license.php. 5 6 #ifndef BITCOIN_WALLET_LOAD_H 7 #define BITCOIN_WALLET_LOAD_H 8 9 #include <string> 10 #include <vector> 11 12 class CScheduler; 13 14 namespace interfaces { 15 class Chain; 16 } // namespace interfaces 17 18 //! Responsible for reading and validating the -wallet arguments and verifying the wallet database. 19 //! This function will perform salvage on the wallet if requested, as long as only one wallet is 20 //! being loaded (WalletInit::ParameterInteraction() forbids -salvagewallet, -zapwallettxes or -upgradewallet with multiwallet). 21 bool VerifyWallets(interfaces::Chain& chain, const std::vector<std::string>& wallet_files); 22 23 //! Load wallet databases. 24 bool LoadWallets(interfaces::Chain& chain, const std::vector<std::string>& wallet_files); 25 26 //! Complete startup of wallets. 27 void StartWallets(CScheduler& scheduler); 28 29 //! Flush all wallets in preparation for shutdown. 30 void FlushWallets(); 31 32 //! Stop all wallets. Wallets will be flushed first. 33 void StopWallets(); 34 35 //! Close all wallets. 36 void UnloadWallets(); 37 38 #endif // BITCOIN_WALLET_LOAD_H 39