aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2015-05-15 13:36:09 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2015-05-15 13:37:31 +0200
commit63e7016566f382ff59fe724d09d556022c897222 (patch)
tree70ed54b618a6b92efa93e1811d106b083098a069 /src
parent16e8ea3dde8d68911327cf109a6c2a78fdb30950 (diff)
parent8f0947be34e1a462e5fa4e212d73bcdba6208da4 (diff)
Merge pull request #6140
8f0947b Increase timeouts in pruning.py and modify warning language. (Alex Morcos) b89f307 Fix incorrect variable name in FindFilesToPrune (Suhas Daftuar)
Diffstat (limited to 'src')
-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)