diff options
author | Luke Dashjr <luke-jr+git@utopios.org> | 2012-05-22 19:51:13 +0000 |
---|---|---|
committer | Luke Dashjr <luke-jr+git@utopios.org> | 2012-07-11 04:26:44 +0000 |
commit | 148e107da6f3e0f477e773cc3a3cb882ff53dab4 (patch) | |
tree | 6ca8d32346ca827c06b90475c27ae0f31dde970c /src/test/test_bitcoin.cpp | |
parent | fbf99a9cdc3293b05ccc18c2f2dc6ae45da4258c (diff) |
Run BDB disk-less for test_bitcoin
Diffstat (limited to 'src/test/test_bitcoin.cpp')
-rw-r--r-- | src/test/test_bitcoin.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/test/test_bitcoin.cpp b/src/test/test_bitcoin.cpp index 96d63bff97..cae0bb6baf 100644 --- a/src/test/test_bitcoin.cpp +++ b/src/test/test_bitcoin.cpp @@ -1,6 +1,7 @@ #define BOOST_TEST_MODULE Bitcoin Test Suite #include <boost/test/unit_test.hpp> +#include "db.h" #include "main.h" #include "wallet.h" @@ -14,13 +15,18 @@ struct TestingSetup { TestingSetup() { fPrintToConsole = true; // don't want to write to debug.log file noui_connect(); - pwalletMain = new CWallet(); + bitdb.MakeMock(); + LoadBlockIndex(true); + bool fFirstRun; + pwalletMain = new CWallet("wallet.dat"); + pwalletMain->LoadWallet(fFirstRun); RegisterWallet(pwalletMain); } ~TestingSetup() { delete pwalletMain; pwalletMain = NULL; + bitdb.Flush(true); } }; |