Skip to content

Commit 2a82298

Browse files
committed
Merge pull request #6129
c208040 Fix for clearing fCheckForPruning (Alex Morcos)
2 parents ac75baf + c208040 commit 2a82298

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/main.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1886,6 +1886,7 @@ bool static FlushStateToDisk(CValidationState &state, FlushStateMode mode) {
18861886
try {
18871887
if (fPruneMode && fCheckForPruning) {
18881888
FindFilesToPrune(setFilesToPrune);
1889+
fCheckForPruning = false;
18891890
if (!setFilesToPrune.empty()) {
18901891
fFlushForPrune = true;
18911892
if (!fHavePruned) {
@@ -1942,10 +1943,8 @@ bool static FlushStateToDisk(CValidationState &state, FlushStateMode mode) {
19421943
}
19431944
}
19441945
// Finally remove any pruned files
1945-
if (fFlushForPrune) {
1946+
if (fFlushForPrune)
19461947
UnlinkPrunedFiles(setFilesToPrune);
1947-
fCheckForPruning = false;
1948-
}
19491948
nLastWrite = nNow;
19501949
}
19511950
// Flush best chain related state. This can only be done if the blocks / block index write was also done.

0 commit comments

Comments
 (0)