Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/test/wallet_test_fixture.cpp
// Copyright (c) 2016 The Bitcoin Core developers | // Copyright (c) 2016 The Bitcoin Core developers | ||||
// Distributed under the MIT software license, see the accompanying | // Distributed under the MIT software license, see the accompanying | ||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | // file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
#include <wallet/test/wallet_test_fixture.h> | #include <wallet/test/wallet_test_fixture.h> | ||||
#include <chainparams.h> | #include <chainparams.h> | ||||
#include <validationinterface.h> | #include <validationinterface.h> | ||||
#include <wallet/rpcdump.h> | #include <wallet/rpcdump.h> | ||||
WalletTestingSetup::WalletTestingSetup(const std::string &chainName) | WalletTestingSetup::WalletTestingSetup(const std::string &chainName) | ||||
: TestingSetup(chainName), m_chain(interfaces::MakeChain(m_node, Params())), | : TestingSetup(chainName), m_chain(interfaces::MakeChain(m_node, Params())), | ||||
m_wallet(Params(), m_chain.get(), WalletLocation(), | m_wallet(m_chain.get(), WalletLocation(), WalletDatabase::CreateMock()) { | ||||
WalletDatabase::CreateMock()) { | |||||
bool fFirstRun; | bool fFirstRun; | ||||
m_wallet.LoadWallet(fFirstRun); | m_wallet.LoadWallet(fFirstRun); | ||||
m_chain_notifications_handler = | m_chain_notifications_handler = | ||||
m_chain->handleNotifications({&m_wallet, [](CWallet *) {}}); | m_chain->handleNotifications({&m_wallet, [](CWallet *) {}}); | ||||
m_chain_client->registerRpcs(); | m_chain_client->registerRpcs(); | ||||
} | } |