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:
parent
3026baaa7c
commit
bb790aa24d
1 changed files with 2 additions and 2 deletions
|
@ -78,10 +78,10 @@ void Shutdown(void* parg)
|
||||||
StopNode();
|
StopNode();
|
||||||
{
|
{
|
||||||
LOCK(cs_main);
|
LOCK(cs_main);
|
||||||
if (pcoinsTip)
|
|
||||||
pcoinsTip->Flush();
|
|
||||||
if (pblocktree)
|
if (pblocktree)
|
||||||
pblocktree->Flush();
|
pblocktree->Flush();
|
||||||
|
if (pcoinsTip)
|
||||||
|
pcoinsTip->Flush();
|
||||||
delete pcoinsTip;
|
delete pcoinsTip;
|
||||||
delete pcoinsdbview;
|
delete pcoinsdbview;
|
||||||
delete pblocktree;
|
delete pblocktree;
|
||||||
|
|
Loading…
Reference in a new issue