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.
pull/59/head
Pieter Wuille 12 years ago
parent 3026baaa7c
commit bb790aa24d

@ -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