dogecoin/src/wallet/test/wallet_test_fixture.cpp
Wladimir J. van der Laan 653bb3d640 Add copyright header to wallet_text_fixture.cpp
I created the file but forgot to add this header.
2016-08-22 09:24:50 +02:00

33 lines
820 B
C++

// Copyright (c) 2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "wallet/test/wallet_test_fixture.h"
#include "rpc/server.h"
#include "wallet/db.h"
#include "wallet/wallet.h"
WalletTestingSetup::WalletTestingSetup(const std::string& chainName):
TestingSetup(chainName)
{
bitdb.MakeMock();
bool fFirstRun;
pwalletMain = new CWallet("wallet_test.dat");
pwalletMain->LoadWallet(fFirstRun);
RegisterValidationInterface(pwalletMain);
RegisterWalletRPCCommands(tableRPC);
}
WalletTestingSetup::~WalletTestingSetup()
{
UnregisterValidationInterface(pwalletMain);
delete pwalletMain;
pwalletMain = NULL;
bitdb.Flush(true);
bitdb.Reset();
}