aboutsummaryrefslogtreecommitdiff
path: root/src/init.cpp
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2012-09-03 15:26:57 +0200
committerPieter Wuille <pieter.wuille@gmail.com>2012-10-20 23:08:57 +0200
commitd979e6e36ac6be0d40b2a6bb70c668f9e6989ff9 (patch)
tree6ed14b062fb97de3c1b9646161297649825b62e4 /src/init.cpp
parent857c61df0b71c8a0482b1bf8fc55849f8ad831b8 (diff)
Use singleton block tree database instance
Diffstat (limited to 'src/init.cpp')
-rw-r--r--src/init.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/init.cpp b/src/init.cpp
index 99e2bba376..07e5d13d6e 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -79,8 +79,10 @@ void Shutdown(void* parg)
{
LOCK(cs_main);
pcoinsTip->Flush();
+ pblocktree->Flush();
delete pcoinsTip;
delete pcoinsdbview;
+ delete pblocktree;
}
bitdb.Flush(true);
boost::filesystem::remove(GetPidFile());
@@ -650,6 +652,7 @@ bool AppInit2()
uiInterface.InitMessage(_("Loading block index..."));
printf("Loading block index...\n");
nStart = GetTimeMillis();
+ pblocktree = new CBlockTreeDB("cr+");
pcoinsdbview = new CCoinsViewDB();
pcoinsTip = new CCoinsViewCache(*pcoinsdbview);