aboutsummaryrefslogtreecommitdiff
path: root/src/util.h
diff options
context:
space:
mode:
authorAnthony Towns <[email protected]>2018-04-04 18:07:00 +1000
committerAnthony Towns <[email protected]>2018-04-11 23:15:28 +1000
commit68797e20f478d835b7ff691a656242c14283446a (patch)
treee64f31bebc1497fbb733805dba721e130e32e11c /src/util.h
parentArgsManager: limit some options to only apply on mainnet when in default section (diff)
downloaddiscoin-68797e20f478d835b7ff691a656242c14283446a.tar.xz
discoin-68797e20f478d835b7ff691a656242c14283446a.zip
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/util.h')
-rw-r--r--src/util.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/util.h b/src/util.h
index 813243562..ba80c21dd 100644
--- a/src/util.h
+++ b/src/util.h
@@ -246,6 +246,14 @@ public:
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
*
* @param strArg Argument to get (e.g. "-foo")