From c8cee26100c4f5196aff452d75a24ea7f1135595 Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Wed, 8 Feb 2017 04:07:13 +0000 Subject: Qt/Intro: Update block chain size --- src/qt/intro.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qt/intro.cpp b/src/qt/intro.cpp index 6d6af54290..9c2aab602b 100644 --- a/src/qt/intro.cpp +++ b/src/qt/intro.cpp @@ -23,7 +23,7 @@ static const uint64_t GB_BYTES = 1000000000LL; /* Minimum free space (in GB) needed for data directory */ -static const uint64_t BLOCK_CHAIN_SIZE = 80; +static const uint64_t BLOCK_CHAIN_SIZE = 120; /* Minimum free space (in GB) needed for data directory when pruned; Does not include prune target */ static const uint64_t CHAIN_STATE_SIZE = 2; /* Total required space (in GB) depending on user choice (prune, not prune) */ -- cgit v1.2.3 From 93ffba7163b4f3c0262c58c1e76e252350e4260e Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Wed, 8 Feb 2017 04:00:16 +0000 Subject: Bugfix: Qt/Intro: Chain state needs to be stored even with the full blockchain --- src/qt/intro.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/qt/intro.cpp b/src/qt/intro.cpp index 9c2aab602b..e45ba2d151 100644 --- a/src/qt/intro.cpp +++ b/src/qt/intro.cpp @@ -126,8 +126,10 @@ Intro::Intro(QWidget *parent) : ui->storageLabel->setText(ui->storageLabel->text().arg(tr(PACKAGE_NAME))); uint64_t pruneTarget = std::max(0, GetArg("-prune", 0)); requiredSpace = BLOCK_CHAIN_SIZE; - if (pruneTarget) - requiredSpace = CHAIN_STATE_SIZE + std::ceil(pruneTarget * 1024 * 1024.0 / GB_BYTES); + if (pruneTarget) { + requiredSpace = std::ceil(pruneTarget * 1024 * 1024.0 / GB_BYTES); + } + requiredSpace += CHAIN_STATE_SIZE; ui->sizeWarningLabel->setText(ui->sizeWarningLabel->text().arg(tr(PACKAGE_NAME)).arg(requiredSpace)); startThread(); } -- cgit v1.2.3 From a9baa6d742c0425af4fb048cbd85707143227e84 Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Wed, 8 Feb 2017 19:16:00 +0000 Subject: 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 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(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)); -- cgit v1.2.3