aboutsummaryrefslogtreecommitdiff
path: root/src/init.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/init.cpp')
-rw-r--r--src/init.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/init.cpp b/src/init.cpp
index 2d2a05a936..6d5ac5ab47 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;