File tree Expand file tree Collapse file tree 1 file changed +14
-5
lines changed
Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -64,14 +64,23 @@ static const char* SettingName(OptionsModel::OptionID option)
6464 }
6565}
6666
67+ static bool RequiresNumWorkaround (OptionsModel::OptionID option)
68+ {
69+ switch (option) {
70+ case OptionsModel::DatabaseCache:
71+ case OptionsModel::Prune:
72+ case OptionsModel::PruneSize:
73+ case OptionsModel::ThreadsScriptVerif:
74+ return true ;
75+ default :
76+ return false ;
77+ }
78+ }
79+
6780/* * Call node.updateRwSetting() with Bitcoin 22.x workaround. */
6881static void UpdateRwSetting (interfaces::Node& node, OptionsModel::OptionID option, const util::SettingsValue& value)
6982{
70- if (value.isNum () &&
71- (option == OptionsModel::DatabaseCache ||
72- option == OptionsModel::ThreadsScriptVerif ||
73- option == OptionsModel::Prune ||
74- option == OptionsModel::PruneSize)) {
83+ if (value.isNum () && RequiresNumWorkaround (option)) {
7584 // Write certain old settings as strings, even though they are numbers,
7685 // because Bitcoin 22.x releases try to read these specific settings as
7786 // strings in addOverriddenOption() calls at startup, triggering
You can’t perform that action at this time.
0 commit comments