diff options
Diffstat (limited to 'src/init.cpp')
-rw-r--r-- | src/init.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/init.cpp b/src/init.cpp index d2d6858618..b73c6e8722 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -150,14 +150,9 @@ void Shutdown() { LOCK(cs_main); -#ifdef ENABLE_WALLET - if (pwalletMain) - pwalletMain->SetBestChain(chainActive.GetLocator()); -#endif - if (pblocktree) - pblocktree->Flush(); - if (pcoinsTip) - pcoinsTip->Flush(); + if (pcoinsTip != NULL) { + FlushStateToDisk(); + } delete pcoinsTip; pcoinsTip = NULL; delete pcoinsdbview; |