Only write options after onboarding#284
Conversation
|
Needs rebase. |
45e3262 to
08be85b
Compare
|
ACK 08be85b |
08be85b to
51df97d
Compare
| #include <cassert> | ||
|
|
||
| OptionsQmlModel::OptionsQmlModel(interfaces::Node& node) | ||
| OptionsQmlModel::OptionsQmlModel(interfaces::Node& node, bool is_onboarded) |
There was a problem hiding this comment.
potentially, a bool indicating if we're onboarded or not could be valuable to other models. Since right now we don't have such a use case, this is fine.
|
tACK on WSL Ubuntu 22.04 on Works as expected, the settings file gets created after the onboarding has finished. settings.json:
Do we want the “Listen” and “natpmp” options to be true by default or was it just for testing this PR? |
|
tACK on Android armv7 everything worked as expected The
|
pablomartin4btc
left a comment
There was a problem hiding this comment.
Concept ACK, I'll test soon. It looks that there are some unaddressed feedback.
pablomartin4btc
left a comment
There was a problem hiding this comment.
tACK 51df97d
Tested in both master(/ main) and this PRs branch: changing all settings touched by this branch's code change and verify the changes were saved accordingly.
Things I noticed during testing:
In main:
- If the user doesn't change anything
setting.jsonfile will look like:
{
"prune": 1907
}
- If the user disables any settings
setting.jsonfile will look like:
{
"prune": 0
"listen": false,
"natpmp": false,
"server": false,
"upnp": false
}
In branch johnny9:write_after_onboard:
- If the user doesn't change anything
setting.jsonfile will look like:
{
"dbcache": 16000,
"listen": true,
"natpmp": true,
"prune": 1907,
"server": true,
"upnp": true
}
- If the user disables any settings
setting.jsonfile will look like:
{
"dbcache": 16000,
}
51df97d to
61f8e6c
Compare
@pablomartin4btc I wasn't able to reproduce the output you were seeing during onboarding but I think I fixed the settings not applying at next startup with initializing the values in the constructor. |
|
tACK 61f8e6c On Ubuntu 22.04 and Android (armv7) Works as expected, settings.json shows defaults: |
pablomartin4btc
left a comment
There was a problem hiding this comment.
tACK 61f8e6c
It behaves as expected.
dbcache setting is not persisted anymore ("dbcache": 16000,), is this correct?
It should only persist if you set it to a value other than nDefaultDbCache (450) |
Perfect, it works. |
61f8e6c to
4f557b0
Compare
4f557b0 to
9e56907
Compare
MarnixCroes
left a comment
There was a problem hiding this comment.
9e56907
writing of the settings works, but it always additionally creates a settings.json.bak file?
| #include <mapport.h> | ||
| #include <qt/guiconstants.h> | ||
| #include <qt/guiutil.h> | ||
| #include <qt/optionsmodel.h> |
There was a problem hiding this comment.
Do we need this?
| #include <qt/optionsmodel.h> |
There was a problem hiding this comment.
It is needed for PruneMiBtoGB i believe
| m_node.updateRwSetting("upnp", m_upnp); | ||
| } | ||
| m_onboarded = true; | ||
| } |
There was a problem hiding this comment.
nit: accidentally removed the last line break?
| } | |
| } | |
There was a problem hiding this comment.
already has a newline character at the end of the file. don't need an additional blank line.
f228ce6 qml: only write options after onboarding (johnny9) 7867574 qml: Set OptionQmlModel initial property values (johnny9) Pull request description: [](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/win64/insecure_win_gui.zip?branch=pull/284) [](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/macos/insecure_mac_gui.zip?branch=pull/284) [](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/macos_arm64/insecure_mac_arm64_gui.zip?branch=pull/284) [](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/android/unsecure_android_apk.zip?branch=pull/284) ACKs for top commit: D33r-Gee: re ACK f228ce6 on Ubuntu 22.04 works as expected pablomartin4btc: re-ACK f228ce6 Tree-SHA512: 6835569e9a3ab340c94c507867c578e46bb86d8c0c8cad639ed97dd09e7edcdbe2b21c1b58fab74c989cbda22acc768dc6004e27d9a6a66b085ea5ac3ec49474
f228ce6f93bffb8f3884c073202bd05d04a33417 qml: only write options after onboarding (johnny9) 7867574a6256b5297e048afa284c50b6150cc293 qml: Set OptionQmlModel initial property values (johnny9) Pull request description: [](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/win64/insecure_win_gui.zip?branch=pull/284) [](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/macos/insecure_mac_gui.zip?branch=pull/284) [](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/macos_arm64/insecure_mac_arm64_gui.zip?branch=pull/284) [](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/android/unsecure_android_apk.zip?branch=pull/284) ACKs for top commit: D33r-Gee: re ACK f228ce6f93bffb8f3884c073202bd05d04a33417 on Ubuntu 22.04 works as expected pablomartin4btc: re-ACK f228ce6f93bffb8f3884c073202bd05d04a33417 Tree-SHA512: 6835569e9a3ab340c94c507867c578e46bb86d8c0c8cad639ed97dd09e7edcdbe2b21c1b58fab74c989cbda22acc768dc6004e27d9a6a66b085ea5ac3ec49474


Uh oh!
There was an error while loading. Please reload this page.