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 <rpc/server.h> | #include <rpc/server.h> | ||||
#include <validationinterface.h> | #include <validationinterface.h> | ||||
#include <wallet/rpcdump.h> | #include <wallet/rpcdump.h> | ||||
#include <wallet/rpcwallet.h> | #include <wallet/rpcwallet.h> | ||||
#include <wallet/wallet.h> | #include <wallet/wallet.h> | ||||
WalletTestingSetup::WalletTestingSetup(const std::string &chainName) | WalletTestingSetup::WalletTestingSetup(const std::string &chainName) | ||||
: TestingSetup(chainName), m_wallet(Params(), *m_chain, WalletLocation(), | : TestingSetup(chainName), | ||||
m_wallet(Params(), m_chain.get(), WalletLocation(), | |||||
WalletDatabase::CreateMock()) { | WalletDatabase::CreateMock()) { | ||||
bool fFirstRun; | bool fFirstRun; | ||||
m_wallet.LoadWallet(fFirstRun); | m_wallet.LoadWallet(fFirstRun); | ||||
m_wallet.m_chain_notifications_handler = | m_wallet.m_chain_notifications_handler = | ||||
m_chain->handleNotifications(m_wallet); | m_chain->handleNotifications(m_wallet); | ||||
m_chain_client->registerRpcs(); | m_chain_client->registerRpcs(); | ||||
} | } |