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 all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

@@ -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, std::numeric_limits<int>::max());

This comment has been minimized.

Copy link
@MarcoFalke

MarcoFalke Apr 12, 2019

Member

Why was this changed in the first place?

Couldn't you restore the ui->pruneSize->setMinimum(nMinDiskSpace); like it was before?

This comment has been minimized.

Copy link
@luke-jr

luke-jr Apr 12, 2019

Author Member

The default max is 99.

This comment has been minimized.

Copy link
@promag

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.