diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2014-11-25 12:17:51 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2014-11-25 12:18:00 +0100 |
commit | 397b9011c9b88ccf623f798a4925228c30813530 (patch) | |
tree | cfd2d7e77893110231b887fde84d26d6af9ba51f /src/init.cpp | |
parent | 97bef1203d20ddd4fbf8685b55b3a416d9d57cbe (diff) | |
parent | a20695001604a8aa9b7baaf52db8642b0b82b0d9 (diff) |
Merge pull request #5241
a206950 Introduce separate flushing modes (Pieter Wuille)
51ce901 Improve chainstate/blockindex disk writing policy (Pieter Wuille)
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; |