Merge pull request #6221

c257a8c Prune: Support noncontiguous block files (Adam Weiss)
This commit is contained in:
Wladimir J. van der Laan
2015-06-11 18:22:10 +02:00
2 changed files with 38 additions and 19 deletions

View File

@@ -3057,9 +3057,9 @@ void FindFilesToPrune(std::set<int>& setFilesToPrune)
if (nCurrentUsage + nBuffer < nPruneTarget) // are we below our target?
break;
// don't prune files that could have a block within MIN_BLOCKS_TO_KEEP of the main chain's tip
// don't prune files that could have a block within MIN_BLOCKS_TO_KEEP of the main chain's tip but keep scanning
if (vinfoBlockFile[fileNumber].nHeightLast > nLastBlockWeCanPrune)
break;
continue;
PruneOneBlockFile(fileNumber);
// Queue up the files for removal