common::GetSetting

Get settings value from combined sources: forced settings, command line arguments, runtime read-write settings, and the read-only config file.

Synopsis

Declared in <common/settings.h>

SettingsValue
GetSetting(
    Settings const& settings,
    std::string const& section,
    std::string const& name,
    bool ignore_default_section_config,
    bool ignore_nonpersistent,
    bool get_chain_type);

Return Value

The resolved setting value, or a null value if unset.

Parameters

NameDescription
ignore_default_section_config- ignore values in the default section of the config file (part before any [section]keywords)
ignore_nonpersistent- ignore non-persistent settings values (forced settings values and values specified on the command line). Only return settings in the read-only config and read-write settings files.
get_chain_type- enable special backwards compatible behavior for GetChainType
settingsThe combined settings sources to read from.
sectionThe config section to look up (e.g. the network name).
nameThe setting name to look up.