mirror of
https://github.com/Retropex/bitcoin.git
synced 2025-05-20 23:20:45 +02:00
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
@ -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 New Issue
Block a user