Bitcoin Core 31.0.0
P2P Digital Currency
Loading...
Searching...
No Matches
wallet_test_fixture.cpp
Go to the documentation of this file.
1// Copyright (c) 2016-present 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
5#include <wallet/test/util.h>
7
8#include <scheduler.h>
9#include <util/chaintype.h>
10
11namespace wallet {
13 : TestingSetup(chainType),
14 m_wallet_loader{interfaces::MakeWalletLoader(*m_node.chain, *Assert(m_node.args))},
16{
17 m_chain_notifications_handler = m_node.chain->handleNotifications({ &m_wallet, [](CWallet*) {} });
18 m_wallet_loader->registerRpcs();
19}
20
22{
23 if (m_node.scheduler) m_node.scheduler->stop();
24}
25} // namespace wallet
ArgsManager & args
Definition bitcoind.cpp:277
ChainType
Definition chaintype.h:11
#define Assert(val)
Identity function.
Definition check.h:113
A CWallet maintains a set of transactions and balances, and provides the ability to create new transa...
Definition wallet.h:310
std::unique_ptr< WalletDatabase > CreateMockableWalletDatabase(MockableData records)
Definition util.cpp:211
node::NodeContext m_node
TestingSetup(ChainType chainType=ChainType::MAIN, TestOpts={})
std::unique_ptr< interfaces::WalletLoader > m_wallet_loader
std::unique_ptr< interfaces::Handler > m_chain_notifications_handler
WalletTestingSetup(ChainType chainType=ChainType::MAIN)