mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-21 04:09:09 +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:
@@ -14,7 +14,8 @@ WalletTestingSetup::WalletTestingSetup(const std::string& chainName):
|
||||
bitdb.MakeMock();
|
||||
|
||||
bool fFirstRun;
|
||||
pwalletMain = new CWallet("wallet_test.dat");
|
||||
std::unique_ptr<CWalletDBWrapper> dbw(new CWalletDBWrapper(&bitdb, "wallet_test.dat"));
|
||||
pwalletMain = new CWallet(std::move(dbw));
|
||||
pwalletMain->LoadWallet(fFirstRun);
|
||||
RegisterValidationInterface(pwalletMain);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user