aboutsummaryrefslogtreecommitdiff
path: root/src/util.h
diff options
context:
space:
mode:
authorAnthony Towns <aj@erisian.com.au>2018-04-04 18:07:00 +1000
committerAnthony Towns <aj@erisian.com.au>2018-04-11 23:15:28 +1000
commit68797e20f478d835b7ff691a656242c14283446a (patch)
treee64f31bebc1497fbb733805dba721e130e32e11c /src/util.h
parentd1fc4d95afc191072fc650581a9b668b68b47b15 (diff)
downloadbitcoin-68797e20f478d835b7ff691a656242c14283446a.tar.xz
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 8132435628..ba80c21ddc 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")