ArgsManager: Warn when ignoring network-specific config setting

When network-specific options such as -addnode, -connect, etc are
specified in the default section of the config file, but that setting is
ignored due to testnet or regtest being in use, and it is not overridden
by either a command line option or a setting in the [regtest] or [test]
section of the config file, a warning is added to the log, eg:

  Warning: Config setting for -connect only applied on regtest network when in [regtest] section.
This commit is contained in:
Anthony Towns
2018-04-04 18:07:00 +10:00
parent d1fc4d95af
commit 68797e20f4
3 changed files with 41 additions and 0 deletions

View File

@@ -245,6 +245,14 @@ public:
void ParseParameters(int argc, const char*const argv[]);
void ReadConfigFile(const std::string& confPath);
/**
* Log warnings for options in m_section_only_args when
* they are specified in the default section but not overridden
* on the command line or in a network-specific section in the
* config file.
*/
void WarnForSectionOnlyArgs();
/**
* Return a vector of strings of the given argument
*