mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-22 05:30:21 +01:00
settings: Add update/getPersistent/isIgnored methods
Add interfaces::Node methods to give GUI finer grained control over settings.json file. Update method is used to write settings to the file, getPersistent and isIgnored methods are used to find out about settings file and command line option interactions.
This commit is contained in:
@@ -127,6 +127,7 @@ SettingsValue GetSetting(const Settings& settings,
|
||||
const std::string& section,
|
||||
const std::string& name,
|
||||
bool ignore_default_section_config,
|
||||
bool ignore_nonpersistent,
|
||||
bool get_chain_name)
|
||||
{
|
||||
SettingsValue result;
|
||||
@@ -162,6 +163,9 @@ SettingsValue GetSetting(const Settings& settings,
|
||||
return;
|
||||
}
|
||||
|
||||
// Ignore nonpersistent settings if requested.
|
||||
if (ignore_nonpersistent && (source == Source::COMMAND_LINE || source == Source::FORCED)) return;
|
||||
|
||||
// Skip negated command line settings.
|
||||
if (skip_negated_command_line && span.last_negated()) return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user