diff options
author | Anthony Towns <aj@erisian.com.au> | 2018-04-04 18:07:00 +1000 |
---|---|---|
committer | Anthony Towns <aj@erisian.com.au> | 2018-04-11 23:15:28 +1000 |
commit | 68797e20f478d835b7ff691a656242c14283446a (patch) | |
tree | e64f31bebc1497fbb733805dba721e130e32e11c /src/init.cpp | |
parent | d1fc4d95afc191072fc650581a9b668b68b47b15 (diff) |
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.
Diffstat (limited to 'src/init.cpp')
-rw-r--r-- | src/init.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/init.cpp b/src/init.cpp index 9edd93000f..8db1b922c4 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -803,6 +803,11 @@ void InitParameterInteraction() if (gArgs.SoftSetBoolArg("-whitelistrelay", true)) LogPrintf("%s: parameter interaction: -whitelistforcerelay=1 -> setting -whitelistrelay=1\n", __func__); } + + // Warn if network-specific options (-addnode, -connect, etc) are + // specified in default section of config file, but not overridden + // on the command line or in this network's section of the config file. + gArgs.WarnForSectionOnlyArgs(); } static std::string ResolveErrMsg(const char * const optname, const std::string& strBind) |