refactor: Add and use PRUNE_TARGET_MANUAL constexpr

This commit is contained in:
MarcoFalke
2023-03-15 16:10:24 +01:00
parent fa9bd7be47
commit fadf8b8182
4 changed files with 4 additions and 5 deletions

View File

@@ -17,7 +17,7 @@ std::optional<bilingual_str> ApplyArgsManOptions(const ArgsManager& args, BlockM
}
uint64_t nPruneTarget{uint64_t(nPruneArg) * 1024 * 1024};
if (nPruneArg == 1) { // manual pruning: -prune=1
nPruneTarget = std::numeric_limits<uint64_t>::max();
nPruneTarget = BlockManager::PRUNE_TARGET_MANUAL;
} else if (nPruneTarget) {
if (nPruneTarget < MIN_DISK_SPACE_FOR_BLOCK_FILES) {
return strprintf(_("Prune configured below the minimum of %d MiB. Please use a higher number."), MIN_DISK_SPACE_FOR_BLOCK_FILES / 1024 / 1024);