Browse Source

First flush block tree, then coin set

As the coinset data refers to the best block, stored in the block
tree. Flushing the coin set first can cause inconsistencies if
the process gets killed in between.
miguelfreitas
Pieter Wuille 12 years ago
parent
commit
bb790aa24d
  1. 4
      src/init.cpp

4
src/init.cpp

@ -78,10 +78,10 @@ void Shutdown(void* parg) @@ -78,10 +78,10 @@ void Shutdown(void* parg)
StopNode();
{
LOCK(cs_main);
if (pcoinsTip)
pcoinsTip->Flush();
if (pblocktree)
pblocktree->Flush();
if (pcoinsTip)
pcoinsTip->Flush();
delete pcoinsTip;
delete pcoinsdbview;
delete pblocktree;

Loading…
Cancel
Save