@@ -2932,7 +2932,7 @@ void FindFilesToPrune(std::set<int>& setFilesToPrune)
2932
2932
return ;
2933
2933
}
2934
2934
2935
- unsigned int nLastBlockWeMustKeep = chainActive.Tip ()->nHeight - MIN_BLOCKS_TO_KEEP;
2935
+ unsigned int nLastBlockWeCanPrune = chainActive.Tip ()->nHeight - MIN_BLOCKS_TO_KEEP;
2936
2936
uint64_t nCurrentUsage = CalculateCurrentUsage ();
2937
2937
// We don't check to prune until after we've allocated new space for files
2938
2938
// So we should leave a buffer under our target to account for another allocation
@@ -2952,7 +2952,7 @@ void FindFilesToPrune(std::set<int>& setFilesToPrune)
2952
2952
break ;
2953
2953
2954
2954
// don't prune files that could have a block within MIN_BLOCKS_TO_KEEP of the main chain's tip
2955
- if (vinfoBlockFile[fileNumber].nHeightLast > nLastBlockWeMustKeep )
2955
+ if (vinfoBlockFile[fileNumber].nHeightLast > nLastBlockWeCanPrune )
2956
2956
break ;
2957
2957
2958
2958
PruneOneBlockFile (fileNumber);
@@ -2963,10 +2963,10 @@ void FindFilesToPrune(std::set<int>& setFilesToPrune)
2963
2963
}
2964
2964
}
2965
2965
2966
- LogPrint (" prune" , " Prune: target=%dMiB actual=%dMiB diff=%dMiB min_must_keep =%d removed %d blk/rev pairs\n " ,
2966
+ LogPrint (" prune" , " Prune: target=%dMiB actual=%dMiB diff=%dMiB max_prune_height =%d removed %d blk/rev pairs\n " ,
2967
2967
nPruneTarget/1024 /1024 , nCurrentUsage/1024 /1024 ,
2968
2968
((int64_t )nPruneTarget - (int64_t )nCurrentUsage)/1024 /1024 ,
2969
- nLastBlockWeMustKeep , count);
2969
+ nLastBlockWeCanPrune , count);
2970
2970
}
2971
2971
2972
2972
bool CheckDiskSpace (uint64_t nAdditionalBytes)
0 commit comments