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.
This commit is contained in:
Pieter Wuille 2012-10-25 20:47:11 +02:00
parent 3026baaa7c
commit bb790aa24d

View File

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