Prompt user after upgrading to RDTS-enabled version#256
Prompt user after upgrading to RDTS-enabled version#256luke-jr wants to merge 3 commits intobitcoinknots:29.x-knotsfrom
Conversation
9f3c7e7 to
9cb51e9
Compare
9cb51e9 to
c6ac662
Compare
|
Concept ACK; it's very important to get explicit agreement from users regarding consensus changes. |
| "\n" | ||
| "This release adds enforcement of the one-year \"reduced data\" protocol change to the Bitcoin rules, beginning no later than September." | ||
| "This upgrade fixes an existential threat to the Bitcoin network.\n" | ||
| "\n" |
There was a problem hiding this comment.
Missing whitespace between concatenated string literals — "September." is immediately followed by "This upgrade fixes...", producing "September.This upgrade" in the displayed message.
Needs a \n or space.
| } else { | ||
| setting = CONSENSUSRULES_REQUIRED; | ||
| } | ||
| }); |
There was a problem hiding this comment.
Return value of WriteSettingsFile() is silently discarded. If writing fails (disk full, permissions), the user's consent is lost and they'll be re-prompted on every startup despite having already consented. Should at least log a warning on failure.
| std::map<std::string, common::SettingsValue> new_rw_settings; | ||
| if (auto it = settings.rw_settings.find("consensusrules"); it != settings.rw_settings.end()) { | ||
| new_rw_settings.emplace(it->first, std::move(it->second)); | ||
| } |
There was a problem hiding this comment.
This hardcodes "consensusrules" instead of using CONSENSUSRULES_CONFIG_NAME from chainparamsbase.h. If the constant changes, this preservation logic in resetSettings silently breaks and users lose their consent on settings reset.
Require
consensusrules=rdtsin config to start; if missing, give a brief explanation and let the GUI user consent on the spot.Intended to only be merged together with #238