aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorSuhas Daftuar <sdaftuar@gmail.com>2015-04-23 09:40:21 -0400
committerSuhas Daftuar <sdaftuar@gmail.com>2015-05-13 14:58:55 -0400
commitb89f30775d9b8516573b6347b522f3e28f550f8d (patch)
tree794d5060201cfadfc6ef4d46bf49117561ce7851 /src/main.cpp
parent2cc1372190c01bc6aae70f94fcc3b81ae4f7aba3 (diff)
downloadbitcoin-b89f30775d9b8516573b6347b522f3e28f550f8d.tar.xz
Fix incorrect variable name in FindFilesToPrune
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 79ee4e55ec..9a3c272e0e 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -2932,7 +2932,7 @@ void FindFilesToPrune(std::set<int>& setFilesToPrune)
return;
}
- unsigned int nLastBlockWeMustKeep = chainActive.Tip()->nHeight - MIN_BLOCKS_TO_KEEP;
+ unsigned int nLastBlockWeCanPrune = chainActive.Tip()->nHeight - MIN_BLOCKS_TO_KEEP;
uint64_t nCurrentUsage = CalculateCurrentUsage();
// We don't check to prune until after we've allocated new space for files
// So we should leave a buffer under our target to account for another allocation
@@ -2952,7 +2952,7 @@ void FindFilesToPrune(std::set<int>& setFilesToPrune)
break;
// don't prune files that could have a block within MIN_BLOCKS_TO_KEEP of the main chain's tip
- if (vinfoBlockFile[fileNumber].nHeightLast > nLastBlockWeMustKeep)
+ if (vinfoBlockFile[fileNumber].nHeightLast > nLastBlockWeCanPrune)
break;
PruneOneBlockFile(fileNumber);
@@ -2963,10 +2963,10 @@ void FindFilesToPrune(std::set<int>& setFilesToPrune)
}
}
- LogPrint("prune", "Prune: target=%dMiB actual=%dMiB diff=%dMiB min_must_keep=%d removed %d blk/rev pairs\n",
+ LogPrint("prune", "Prune: target=%dMiB actual=%dMiB diff=%dMiB max_prune_height=%d removed %d blk/rev pairs\n",
nPruneTarget/1024/1024, nCurrentUsage/1024/1024,
((int64_t)nPruneTarget - (int64_t)nCurrentUsage)/1024/1024,
- nLastBlockWeMustKeep, count);
+ nLastBlockWeCanPrune, count);
}
bool CheckDiskSpace(uint64_t nAdditionalBytes)