aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_bitcoin.cpp
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2012-09-04 18:12:00 +0200
committerPieter Wuille <pieter.wuille@gmail.com>2012-10-20 23:08:57 +0200
commite1bfbab8029c33102889d7d970da5b6cc32ff75b (patch)
treec96ed4dca6cbca2791096fe95e2e866c06016a6a /src/test/test_bitcoin.cpp
parent2d8a48292b0da96cda8d7b45a24a22adfb4667b2 (diff)
Add LevelDB MemEnv support
Support LevelDB memory-backed environments, and use them in unit tests.
Diffstat (limited to 'src/test/test_bitcoin.cpp')
-rw-r--r--src/test/test_bitcoin.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/test/test_bitcoin.cpp b/src/test/test_bitcoin.cpp
index 4580877cd8..0173c0064b 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"
@@ -18,8 +19,13 @@ struct TestingSetup {
fPrintToDebugger = true; // don't want to write to debug.log file
noui_connect();
bitdb.MakeMock();
- pblocktree = new CBlockTreeDB("cr+");
+#ifdef USE_LEVELDB
+ pblocktree = new CBlockTreeDB(true);
+ pcoinsdbview = new CCoinsViewDB(true);
+#else
+ pblocktree = new CBlockTreeDB();
pcoinsdbview = new CCoinsViewDB();
+#endif
pcoinsTip = new CCoinsViewCache(*pcoinsdbview);
LoadBlockIndex(true);
bool fFirstRun;