aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/test
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2017-03-08 11:48:58 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2017-04-20 17:15:30 +0200
commit71afe3c0995592ff17968816a833a8ed3ce05bf2 (patch)
tree84df1ac80d58db77464e500bf152a41bace9a4ac /src/wallet/test
parent987a6c09562e1e1e9d6623b999ae9de268490e4b (diff)
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.
Diffstat (limited to 'src/wallet/test')
-rw-r--r--src/wallet/test/wallet_test_fixture.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/wallet/test/wallet_test_fixture.cpp b/src/wallet/test/wallet_test_fixture.cpp
index a76db37617..1989bf8d9b 100644
--- a/src/wallet/test/wallet_test_fixture.cpp
+++ b/src/wallet/test/wallet_test_fixture.cpp
@@ -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);