Merge 5d37c1bde0 into merged_master (Bitcoin PR #15976)

This commit is contained in:
Andrew Poelstra 2020-11-06 15:20:12 +00:00
commit cb15f46946
9 changed files with 274 additions and 240 deletions

View file

@ -265,7 +265,7 @@ void Shutdown(InitInterfaces& interfaces)
// FlushStateToDisk generates a ChainStateFlushed callback, which we should avoid missing
if (pcoinsTip != nullptr) {
FlushStateToDisk();
::ChainstateActive().ForceFlushStateToDisk();
}
// After there are no more peers/RPC left to give us new data which may generate
@ -281,7 +281,7 @@ void Shutdown(InitInterfaces& interfaces)
{
LOCK(cs_main);
if (pcoinsTip != nullptr) {
FlushStateToDisk();
::ChainstateActive().ForceFlushStateToDisk();
}
pcoinsTip.reset();
pcoinscatcher.reset();
@ -1757,7 +1757,7 @@ bool AppInitMain(InitInterfaces& interfaces)
nLocalServices = ServiceFlags(nLocalServices & ~NODE_NETWORK);
if (!fReindex) {
uiInterface.InitMessage(_("Pruning blockstore..."));
PruneAndFlush();
::ChainstateActive().PruneAndFlush();
}
}