-
Notifications
You must be signed in to change notification settings - Fork 275
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
Do not require restart if overridden option is modified #440
Conversation
Concept ACK. |
concept ack |
Concept ACK |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tACK 17cea05
Tested on Ubuntu 20.04 (Using Qt version 5.12.8)
This PR allows not displaying restart warning for change in options, whose value is already overridden under the bitcoin.conf file.
This is done by adding a conditional statement that displays the warning only when, setting’s name is not present in the bitcoin.conf file (edit: or in command-line options). I checked if there is a way to write only the setting’s name in bitcoin.conf file without specifying the value. There is none. So the logic of code is exemplary here.
The formatting of the code is correct, and the ordering of settings correctly matches the order in which they are displayed. I was able to test this PR on Ubuntu 20.04 successfully. I was able to try all the individual settings successfully. Let me added an example screenshot pair.
Screenshots (for prune option):
Before updating the bitcoin.conf file | After Updating the bitcoin.conf file |
---|---|
I agree with the changes suggested in this PR. The settings overridden by the bitcoin.conf file will not be affected by the change of setting in GUI, and hence they don’t need a restart warning for them.
Or in command-line options. |
Wouldn't it make more sense to instead have a warning message that restart is needed without the overriding option, to make it have effect? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tACK 17cea05
Tested on macOS 12. Conceptually, I agree with this PR. But, the current situation/UX around settings is not ideal. While this change is a step in the right direction, we should still do more.
In regards to this change, we could follow up with some change that makes it clear to the user that a setting is currently overriden by the bitcoin.conf
. It could use similar logic as this pr, utilizing: model->getOverriddenByCommandLine().contains("-prune")
.
I think this PR seems a little dangerous and is is not really an improvement in it's current form, but it could be a good change with some tweaks. The problem I see is the same one luke-jr and jarolrod pointed out, that this is not providing the user a clear enough warning that the change they just tried to make will be ignored. Even if the "This change would require a restart" message was not strictly accurate in all cases (because restarting could be necessary but not sufficient to apply the changes), at least the "This change would require a restart" message gave immediate feedback to the user that the changes they just made would not take effect. After this PR, there is no prominent feedback about the changes being ignored, except for the easy-to-miss "Options set in this dialog are overridden" blurb. I think if the goal of this PR is to remove ambiguity of the "This change would require a restart message", instead of dropping it would be better to replace it with less ambiguous messages depending on the circumstance:
This is really a broader question, and probably best to discuss in a new issue. (There is also a wiki page https://github.com/bitcoin-core/bitcoin-devwiki/wiki/Settings-design-questions to explore tradeoffs, but it hasn't really been filled out or updated.) Two things are worth noting though:
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
🐙 This pull request conflicts with the target branch and needs rebase. Want to unsubscribe from rebase notifications on this pull request? Just convert this pull request to a "draft". |
The options set via the GUI can be overridden by settings in the
bitcoin.conf
or by command-line options. If such an option is overridden, its modification in the GUI has no effect. Therefore, no need to require the client restart.