Coverage Report

Created: 2026-05-30 09:47

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/tmp/bitcoin/src/wallet/test/wallet_test_fixture.cpp
Line
Count
Source
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>
6
#include <wallet/test/wallet_test_fixture.h>
7
8
#include <scheduler.h>
9
#include <util/chaintype.h>
10
11
namespace wallet {
12
WalletTestingSetup::WalletTestingSetup(const ChainType chainType)
13
17
    : TestingSetup(chainType),
14
17
      m_wallet_loader{interfaces::MakeWalletLoader(*m_node.chain, *Assert(m_node.args))},
15
17
      m_wallet(m_node.chain.get(), "", CreateMockableWalletDatabase())
16
17
{
17
17
    m_chain_notifications_handler = m_node.chain->handleNotifications({ &m_wallet, [](CWallet*) {} });
18
17
    m_wallet_loader->registerRpcs();
19
17
}
20
21
WalletTestingSetup::~WalletTestingSetup()
22
17
{
23
17
    if (m_node.scheduler) m_node.scheduler->stop();
24
17
}
25
} // namespace wallet