Branch data Line data Source code
# 1 : : // Copyright (c) 2016-2021 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/wallet_test_fixture.h> # 6 : : # 7 : : #include <scheduler.h> # 8 : : # 9 : : namespace wallet { # 10 : : WalletTestingSetup::WalletTestingSetup(const std::string& chainName) # 11 : : : TestingSetup(chainName), # 12 : : m_wallet_loader{interfaces::MakeWalletLoader(*m_node.chain, *Assert(m_node.args))}, # 13 : : m_wallet(m_node.chain.get(), "", m_args, CreateMockWalletDatabase()) # 14 : 11 : { # 15 : 11 : m_wallet.LoadWallet(); # 16 : 11 : m_chain_notifications_handler = m_node.chain->handleNotifications({ &m_wallet, [](CWallet*) {} }); # 17 : 11 : m_wallet_loader->registerRpcs(); # 18 : 11 : } # 19 : : # 20 : : WalletTestingSetup::~WalletTestingSetup() # 21 : 11 : { # 22 [ + - ]: 11 : if (m_node.scheduler) m_node.scheduler->stop(); # 23 : 11 : } # 24 : : } // namespace wallet