diff options
author | Luke Dashjr <luke-jr+git@utopios.org> | 2017-02-08 19:16:00 +0000 |
---|---|---|
committer | Luke Dashjr <luke-jr+git@utopios.org> | 2017-02-08 19:16:00 +0000 |
commit | a9baa6d742c0425af4fb048cbd85707143227e84 (patch) | |
tree | 0ea8c8162781158a50dedb6f46efd707b0fab03b /src/qt/intro.cpp | |
parent | 93ffba7163b4f3c0262c58c1e76e252350e4260e (diff) |
Bugfix: Qt/Intro: Pruned nodes never require *more* space
Diffstat (limited to 'src/qt/intro.cpp')
-rw-r--r-- | src/qt/intro.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/qt/intro.cpp b/src/qt/intro.cpp index e45ba2d151..96bddb81ed 100644 --- a/src/qt/intro.cpp +++ b/src/qt/intro.cpp @@ -127,7 +127,10 @@ Intro::Intro(QWidget *parent) : uint64_t pruneTarget = std::max<int64_t>(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)); |