mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-05 18:52:29 +02:00
wallet: Introduce database handle wrapper
Abstract database handle from explicit strFilename into CWalletDBWrapper. Also move CWallet::Backup to db.cpp - as it deals with representation details this is a database specific operation.
This commit is contained in:
@@ -86,7 +86,8 @@ void WalletTests::walletTests()
|
||||
TestChain100Setup test;
|
||||
test.CreateAndProcessBlock({}, GetScriptForRawPubKey(test.coinbaseKey.GetPubKey()));
|
||||
bitdb.MakeMock();
|
||||
CWallet wallet("wallet_test.dat");
|
||||
std::unique_ptr<CWalletDBWrapper> dbw(new CWalletDBWrapper(&bitdb, "wallet_test.dat"));
|
||||
CWallet wallet(std::move(dbw));
|
||||
bool firstRun;
|
||||
wallet.LoadWallet(firstRun);
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user