aboutsummaryrefslogtreecommitdiff
path: root/src/init.cpp
diff options
context:
space:
mode:
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);