Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/test/wallet_test_fixture.cpp
Show All 10 Lines | |||||
#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, WalletLocation(), | ||||
WalletDatabase::CreateMock()) { | WalletDatabase::CreateMock()) { | ||||
bool fFirstRun; | bool fFirstRun; | ||||
m_wallet.LoadWallet(fFirstRun); | m_wallet.LoadWallet(fFirstRun); | ||||
RegisterValidationInterface(&m_wallet); | m_wallet.m_chain_notifications_handler = | ||||
m_chain->handleNotifications(m_wallet); | |||||
RegisterWalletRPCCommands(tableRPC); | RegisterWalletRPCCommands(tableRPC); | ||||
RegisterDumpRPCCommands(tableRPC); | RegisterDumpRPCCommands(tableRPC); | ||||
} | } | ||||
WalletTestingSetup::~WalletTestingSetup() { | |||||
UnregisterValidationInterface(&m_wallet); | |||||
} |