aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_bitcoin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/test_bitcoin.cpp')
-rw-r--r--src/test/test_bitcoin.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/test/test_bitcoin.cpp b/src/test/test_bitcoin.cpp
index bcf0907871..c1f47f786b 100644
--- a/src/test/test_bitcoin.cpp
+++ b/src/test/test_bitcoin.cpp
@@ -2,6 +2,7 @@
#include <boost/test/unit_test.hpp>
#include "db.h"
+#include "txdb.h"
#include "main.h"
#include "wallet.h"
@@ -12,10 +13,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(true);
+ pcoinsdbview = new CCoinsViewDB(true);
+ pcoinsTip = new CCoinsViewCache(*pcoinsdbview);
LoadBlockIndex(true);
bool fFirstRun;
pwalletMain = new CWallet("wallet.dat");
@@ -26,6 +32,9 @@ struct TestingSetup {
{
delete pwalletMain;
pwalletMain = NULL;
+ delete pcoinsTip;
+ delete pcoinsdbview;
+ delete pblocktree;
bitdb.Flush(true);
}
};