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:
Ryan Ofsky
2019-04-29 15:29:00 -04:00
parent 0de36941ec
commit 0e55bc6e7f
7 changed files with 101 additions and 10 deletions

View File

@@ -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;