aboutsummaryrefslogtreecommitdiff
path: root/src/validation.cpp
diff options
context:
space:
mode:
authorpracticalswift <practicalswift@users.noreply.github.com>2017-11-06 11:21:15 +0100
committerpracticalswift <practicalswift@users.noreply.github.com>2018-04-11 12:40:08 +0200
commit2311c7cc86b7d3ab4912601ea0c21cc81a9f5eec (patch)
tree7ac3824f6a5ef06c84f5e75af8d6c41f2f6bade0 /src/validation.cpp
parent0a8054e7cd5c76d01e4ac7234e3883d05f6f5fdd (diff)
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.
Diffstat (limited to 'src/validation.cpp')
-rw-r--r--src/validation.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/validation.cpp b/src/validation.cpp
index 4a6c4066fc..1ef57f878b 100644
--- a/src/validation.cpp
+++ b/src/validation.cpp
@@ -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());