mirror of
https://github.com/kvazar-network/kevacoin.git
synced 2025-01-23 21:34:45 +00:00
Bugfix: Qt/Intro: Pruned nodes never require *more* space
This commit is contained in:
parent
93ffba7163
commit
a9baa6d742
@ -127,7 +127,10 @@ Intro::Intro(QWidget *parent) :
|
|||||||
uint64_t pruneTarget = std::max<int64_t>(0, GetArg("-prune", 0));
|
uint64_t pruneTarget = std::max<int64_t>(0, GetArg("-prune", 0));
|
||||||
requiredSpace = BLOCK_CHAIN_SIZE;
|
requiredSpace = BLOCK_CHAIN_SIZE;
|
||||||
if (pruneTarget) {
|
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;
|
requiredSpace += CHAIN_STATE_SIZE;
|
||||||
ui->sizeWarningLabel->setText(ui->sizeWarningLabel->text().arg(tr(PACKAGE_NAME)).arg(requiredSpace));
|
ui->sizeWarningLabel->setText(ui->sizeWarningLabel->text().arg(tr(PACKAGE_NAME)).arg(requiredSpace));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user