1 // Copyright (c) 2016 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.
5 #include <wallet/test/wallet_test_fixture.h>
7 #include <rpc/server.h>
10 WalletTestingSetup::WalletTestingSetup(const std::string
& chainName
):
11 TestingSetup(chainName
)
16 std::unique_ptr
<CWalletDBWrapper
> dbw(new CWalletDBWrapper(&bitdb
, "wallet_test.dat"));
17 pwalletMain
= MakeUnique
<CWallet
>(std::move(dbw
));
18 pwalletMain
->LoadWallet(fFirstRun
);
19 RegisterValidationInterface(pwalletMain
.get());
21 RegisterWalletRPCCommands(tableRPC
);
24 WalletTestingSetup::~WalletTestingSetup()
26 UnregisterValidationInterface(pwalletMain
.get());