Bitcoin Core  0.19.99
P2P Digital Currency
wallet_test_fixture.cpp
Go to the documentation of this file.
1 // Copyright (c) 2016-2019 The Bitcoin Core developers
2 // Distributed under the MIT software license, see the accompanying
3 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
4 
6 
7 WalletTestingSetup::WalletTestingSetup(const std::string& chainName)
8  : TestingSetup(chainName),
9  m_wallet(m_chain.get(), WalletLocation(), WalletDatabase::CreateMock())
10 {
11  bool fFirstRun;
12  m_wallet.LoadWallet(fFirstRun);
14 
15  m_chain_client->registerRpcs();
16 }
std::shared_ptr< CWallet > m_wallet
Definition: wallet.cpp:512
An instance of this class represents one database.
Definition: db.h:111
DBErrors LoadWallet(bool &fFirstRunRet)
Definition: wallet.cpp:2990
Chain & m_chain
Definition: chain.cpp:190
void handleNotifications()
Register the wallet for chain notifications.
Definition: wallet.cpp:3990
std::unique_ptr< interfaces::ChainClient > m_chain_client
The WalletLocation class provides wallet information.
Definition: walletutil.h:67
WalletTestingSetup(const std::string &chainName=CBaseChainParams::MAIN)