mirror of
https://github.com/Retropex/bitcoin.git
synced 2025-05-28 13:02:38 +02:00

Remove requirement that two wallet files can only be opened at the same time if they are contained in the same directory. This change mostly consists of updates to function signatures (updating functions to take fs::path arguments, instead of combinations of strings, fs::path, and CDBEnv / CWalletDBWrapper arguments).
27 lines
786 B
C++
27 lines
786 B
C++
// Copyright (c) 2016-2017 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), m_wallet("mock", CWalletDBWrapper::CreateMock())
|
|
{
|
|
bool fFirstRun;
|
|
g_address_type = OUTPUT_TYPE_DEFAULT;
|
|
g_change_type = OUTPUT_TYPE_DEFAULT;
|
|
m_wallet.LoadWallet(fFirstRun);
|
|
RegisterValidationInterface(&m_wallet);
|
|
|
|
RegisterWalletRPCCommands(tableRPC);
|
|
}
|
|
|
|
WalletTestingSetup::~WalletTestingSetup()
|
|
{
|
|
UnregisterValidationInterface(&m_wallet);
|
|
}
|