Call FlushStateToDisk(...) regardless of fCheckForPruning
FlushStateToDisk(...) won't do anything besides check if we need to prune if FLUSH_STATE_NONE is given. We avoid reading the variable fCheckForPruning which is guarded by the mutex cs_LastBlockFile.
This commit is contained in:
parent
0a8054e7cd
commit
2311c7cc86
1 changed files with 1 additions and 2 deletions
|
@ -3454,8 +3454,7 @@ bool CChainState::AcceptBlock(const std::shared_ptr<const CBlock>& pblock, CVali
|
|||
return AbortNode(state, std::string("System error: ") + e.what());
|
||||
}
|
||||
|
||||
if (fCheckForPruning)
|
||||
FlushStateToDisk(chainparams, state, FlushStateMode::NONE); // we just allocated more disk space for block files
|
||||
FlushStateToDisk(chainparams, state, FlushStateMode::NONE);
|
||||
|
||||
CheckBlockIndex(chainparams.GetConsensus());
|
||||
|
||||
|
|
Loading…
Reference in a new issue