aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/test')
-rw-r--r--src/test/test_bitcoin.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/test/test_bitcoin.cpp b/src/test/test_bitcoin.cpp
index bcf0907871..4580877cd8 100644
--- a/src/test/test_bitcoin.cpp
+++ b/src/test/test_bitcoin.cpp
@@ -12,10 +12,15 @@ extern bool fPrintToConsole;
extern void noui_connect();
struct TestingSetup {
+ CCoinsViewDB *pcoinsdbview;
+
TestingSetup() {
fPrintToDebugger = true; // don't want to write to debug.log file
noui_connect();
bitdb.MakeMock();
+ pblocktree = new CBlockTreeDB("cr+");
+ pcoinsdbview = new CCoinsViewDB();
+ pcoinsTip = new CCoinsViewCache(*pcoinsdbview);
LoadBlockIndex(true);
bool fFirstRun;
pwalletMain = new CWallet("wallet.dat");
@@ -26,6 +31,9 @@ struct TestingSetup {
{
delete pwalletMain;
pwalletMain = NULL;
+ delete pcoinsTip;
+ delete pcoinsdbview;
+ delete pblocktree;
bitdb.Flush(true);
}
};