Bitcoin ABC  0.22.13
P2P Digital Currency
Go to the documentation of this file.
1 // Copyright (c) 2016 The Bitcoin Core developers
2 // Distributed under the MIT software license, see the accompanying
3 // file COPYING or
7 #include <chainparams.h>
8 #include <validationinterface.h>
9 #include <wallet/rpcdump.h>
11 WalletTestingSetup::WalletTestingSetup(const std::string &chainName)
12  : TestingSetup(chainName), m_chain(interfaces::MakeChain(m_node, Params())),
13  m_wallet(m_chain.get(), WalletLocation(), WalletDatabase::CreateMock()) {
14  bool fFirstRun;
15  m_wallet.LoadWallet(fFirstRun);
17  m_chain->handleNotifications({&m_wallet, [](CWallet *) {}});
18  m_chain_client->registerRpcs();
19 }
std::shared_ptr< CWallet > m_wallet
Definition: wallet.cpp:464
NodeContext & m_node
Definition: chain.cpp:442
An instance of this class represents one database.
Definition: bdb.h:97
std::unique_ptr< interfaces::Chain > m_chain
DBErrors LoadWallet(bool &fFirstRunRet)
Definition: wallet.cpp:3453
std::unique_ptr< interfaces::ChainClient > m_chain_client
const CChainParams & Params()
Return the currently selected parameters.
A CWallet maintains a set of transactions and balances, and provides the ability to create new transa...
Definition: wallet.h:679
std::unique_ptr< interfaces::Handler > m_chain_notifications_handler
The WalletLocation class provides wallet information.
Definition: walletutil.h:80
WalletTestingSetup(const std::string &chainName=CBaseChainParams::MAIN)
std::unique_ptr< Chain > MakeChain(NodeContext &node, const CChainParams &params)
Return implementation of Chain interface.
Definition: chain.cpp:448