From a9baa6d742c0425af4fb048cbd85707143227e84 Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Wed, 8 Feb 2017 19:16:00 +0000 Subject: [PATCH] Bugfix: Qt/Intro: Pruned nodes never require *more* space --- src/qt/intro.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/qt/intro.cpp b/src/qt/intro.cpp index e45ba2d15..96bddb81e 100644 --- a/src/qt/intro.cpp +++ b/src/qt/intro.cpp @@ -127,7 +127,10 @@ Intro::Intro(QWidget *parent) : uint64_t pruneTarget = std::max(0, GetArg("-prune", 0)); requiredSpace = BLOCK_CHAIN_SIZE; if (pruneTarget) { - requiredSpace = std::ceil(pruneTarget * 1024 * 1024.0 / GB_BYTES); + uint64_t prunedGBs = std::ceil(pruneTarget * 1024 * 1024.0 / GB_BYTES); + if (prunedGBs <= requiredSpace) { + requiredSpace = prunedGBs; + } } requiredSpace += CHAIN_STATE_SIZE; ui->sizeWarningLabel->setText(ui->sizeWarningLabel->text().arg(tr(PACKAGE_NAME)).arg(requiredSpace)); -- 2.11.4.GIT