Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix: GUI: Options: Initialise prune setting range before loading current value, and remove upper bound limit #15801

Merged
merged 2 commits into from Apr 18, 2019
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

Next

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
  • Loading branch information...
luke-jr committed Apr 11, 2019
commit 4ddeb2f860eee98fbe94725ea8885368068a03f2
@@ -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) */
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.