Merge #9718: Qt/Intro: Various fixes
a9baa6d Bugfix: Qt/Intro: Pruned nodes never require *more* space (Luke Dashjr) 93ffba7 Bugfix: Qt/Intro: Chain state needs to be stored even with the full blockchain (Luke Dashjr) c8cee26 Qt/Intro: Update block chain size (Luke Dashjr)
This commit is contained in:
parent
7d4e34029c
commit
f1f4e25d60
@ -127,8 +127,13 @@ Intro::Intro(QWidget *parent) :
|
||||
ui->storageLabel->setText(ui->storageLabel->text().arg(tr(PACKAGE_NAME)));
|
||||
uint64_t pruneTarget = std::max<int64_t>(0, GetArg("-prune", 0));
|
||||
requiredSpace = BLOCK_CHAIN_SIZE;
|
||||
if (pruneTarget)
|
||||
requiredSpace = CHAIN_STATE_SIZE + std::ceil(pruneTarget * 1024 * 1024.0 / GB_BYTES);
|
||||
if (pruneTarget) {
|
||||
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));
|
||||
startThread();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user