Skip to content

Commit 2311c7c

Browse files
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.
1 parent 0a8054e commit 2311c7c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/validation.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3454,8 +3454,7 @@ bool CChainState::AcceptBlock(const std::shared_ptr<const CBlock>& pblock, CVali
34543454
return AbortNode(state, std::string("System error: ") + e.what());
34553455
}
34563456

3457-
if (fCheckForPruning)
3458-
FlushStateToDisk(chainparams, state, FlushStateMode::NONE); // we just allocated more disk space for block files
3457+
FlushStateToDisk(chainparams, state, FlushStateMode::NONE);
34593458

34603459
CheckBlockIndex(chainparams.GetConsensus());
34613460

0 commit comments

Comments
 (0)