aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2015-05-15 17:32:28 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2015-05-15 17:32:54 +0200
commit2a822987dd710427328fa458a4141e060c39a755 (patch)
treeabd7a44b53bd7bc019042bd570971abebb38507d
parentac75bafafdc394f60f819ede18181682eb5aa662 (diff)
parentc208040354c9312c7d23c7f26a4d009e775e00ff (diff)
Merge pull request #6129
c208040 Fix for clearing fCheckForPruning (Alex Morcos)
-rw-r--r--src/main.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 5fd9c62486..7d7c97f773 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1886,6 +1886,7 @@ bool static FlushStateToDisk(CValidationState &state, FlushStateMode mode) {
try {
if (fPruneMode && fCheckForPruning) {
FindFilesToPrune(setFilesToPrune);
+ fCheckForPruning = false;
if (!setFilesToPrune.empty()) {
fFlushForPrune = true;
if (!fHavePruned) {
@@ -1942,10 +1943,8 @@ bool static FlushStateToDisk(CValidationState &state, FlushStateMode mode) {
}
}
// Finally remove any pruned files
- if (fFlushForPrune) {
+ if (fFlushForPrune)
UnlinkPrunedFiles(setFilesToPrune);
- fCheckForPruning = false;
- }
nLastWrite = nNow;
}
// Flush best chain related state. This can only be done if the blocks / block index write was also done.