aboutsummaryrefslogtreecommitdiff
path: root/src/qt/optionsdialog.cpp
diff options
context:
space:
mode:
authorLuke Dashjr <luke-jr+git@utopios.org>2019-04-11 23:39:59 +0000
committerLuke Dashjr <luke-jr+git@utopios.org>2019-04-11 23:42:26 +0000
commit4ddeb2f860eee98fbe94725ea8885368068a03f2 (patch)
treea37adeed27ff4211d4e1e971faf879c059e6f574 /src/qt/optionsdialog.cpp
parent6f6514a08090b37b5e8c086015ee4881813ef867 (diff)
downloadbitcoin-4ddeb2f860eee98fbe94725ea8885368068a03f2.tar.xz
GUI: Options: Set the range of pruning size before loading its value
Without this, an out-of-default-range value gets limited to the range
Diffstat (limited to 'src/qt/optionsdialog.cpp')
-rw-r--r--src/qt/optionsdialog.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/qt/optionsdialog.cpp b/src/qt/optionsdialog.cpp
index 789b51cd6f..64e6f28ab2 100644
--- a/src/qt/optionsdialog.cpp
+++ b/src/qt/optionsdialog.cpp
@@ -148,6 +148,10 @@ void OptionsDialog::setModel(OptionsModel *_model)
if (_model->isRestartRequired())
showRestartWarning(true);
+ // Prune values are in GB to be consistent with intro.cpp
+ static constexpr uint64_t nMinDiskSpace = (MIN_DISK_SPACE_FOR_BLOCK_FILES / GB_BYTES) + (MIN_DISK_SPACE_FOR_BLOCK_FILES % GB_BYTES) ? 1 : 0;
+ ui->pruneSize->setRange(nMinDiskSpace, _model->node().getAssumedBlockchainSize());
+
QString strLabel = _model->getOverriddenByCommandLine();
if (strLabel.isEmpty())
strLabel = tr("none");
@@ -158,10 +162,6 @@ void OptionsDialog::setModel(OptionsModel *_model)
mapper->toFirst();
updateDefaultProxyNets();
-
- // Prune values are in GB to be consistent with intro.cpp
- static constexpr uint64_t nMinDiskSpace = (MIN_DISK_SPACE_FOR_BLOCK_FILES / GB_BYTES) + (MIN_DISK_SPACE_FOR_BLOCK_FILES % GB_BYTES) ? 1 : 0;
- ui->pruneSize->setRange(nMinDiskSpace, _model->node().getAssumedBlockchainSize());
}
/* warn when one of the following settings changes by user action (placed here so init via mapper doesn't trigger them) */