diff options
| author | practicalswift <[email protected]> | 2017-11-06 11:21:15 +0100 |
|---|---|---|
| committer | practicalswift <[email protected]> | 2018-04-11 12:40:08 +0200 |
| commit | 2311c7cc86b7d3ab4912601ea0c21cc81a9f5eec (patch) | |
| tree | 7ac3824f6a5ef06c84f5e75af8d6c41f2f6bade0 /src/validation.cpp | |
| parent | Merge #12731: Support serialization as another type without casting (diff) | |
| download | discoin-2311c7cc86b7d3ab4912601ea0c21cc81a9f5eec.tar.xz discoin-2311c7cc86b7d3ab4912601ea0c21cc81a9f5eec.zip | |
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.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/validation.cpp b/src/validation.cpp index 4a6c4066f..1ef57f878 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()); |