|
|
@ -1886,6 +1886,7 @@ bool static FlushStateToDisk(CValidationState &state, FlushStateMode mode) { |
|
|
|
try { |
|
|
|
try { |
|
|
|
if (fPruneMode && fCheckForPruning) { |
|
|
|
if (fPruneMode && fCheckForPruning) { |
|
|
|
FindFilesToPrune(setFilesToPrune); |
|
|
|
FindFilesToPrune(setFilesToPrune); |
|
|
|
|
|
|
|
fCheckForPruning = false; |
|
|
|
if (!setFilesToPrune.empty()) { |
|
|
|
if (!setFilesToPrune.empty()) { |
|
|
|
fFlushForPrune = true; |
|
|
|
fFlushForPrune = true; |
|
|
|
if (!fHavePruned) { |
|
|
|
if (!fHavePruned) { |
|
|
@ -1942,10 +1943,8 @@ bool static FlushStateToDisk(CValidationState &state, FlushStateMode mode) { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
// Finally remove any pruned files
|
|
|
|
// Finally remove any pruned files
|
|
|
|
if (fFlushForPrune) { |
|
|
|
if (fFlushForPrune) |
|
|
|
UnlinkPrunedFiles(setFilesToPrune); |
|
|
|
UnlinkPrunedFiles(setFilesToPrune); |
|
|
|
fCheckForPruning = false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
nLastWrite = nNow; |
|
|
|
nLastWrite = nNow; |
|
|
|
} |
|
|
|
} |
|
|
|
// Flush best chain related state. This can only be done if the blocks / block index write was also done.
|
|
|
|
// Flush best chain related state. This can only be done if the blocks / block index write was also done.
|
|
|
|