aboutsummaryrefslogtreecommitdiff
path: root/src/util/system.cpp
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2020-10-19 11:30:42 +0200
committerMarcoFalke <falke.marco@gmail.com>2020-10-19 11:30:49 +0200
commit4769942d901a6095dc8715b6008d608e62d10b3c (patch)
tree2d6f57bd35896c2ce4fd847506e3f7bbe5815a19 /src/util/system.cpp
parentd9d9a293520d26ca8fec8caebab46db103b29903 (diff)
parentfa48405ef84985e5a9d38ec38e90d16596ea45b5 (diff)
downloadbitcoin-4769942d901a6095dc8715b6008d608e62d10b3c.tar.xz
Merge #19624: Warn on unknown rw_settings
fa48405ef84985e5a9d38ec38e90d16596ea45b5 Warn on unknown rw_settings (MarcoFalke) Pull request description: Log a warning to debug log if unknown settings are encountered. This should probably only ever happen when the software is upgraded. Something similar is already done for the command line and config file. See: * test: Add test for unknown args #16234 (commit fa7dd88b71a1c6641bd450fae29a4a31849b1afd) ACKs for top commit: ryanofsky: Code review ACK fa48405ef84985e5a9d38ec38e90d16596ea45b5. Looks good and I could see this being helpful for debugging. Thanks for taking suggestions Tree-SHA512: cec7d88adf84fa0a842f56b26245157736eb50df433db951e622ea07fd145b899822b24cdab1d8b36c066415ce4f0ef09b493fa8a8d691532822a59c573aafa7
Diffstat (limited to 'src/util/system.cpp')
-rw-r--r--src/util/system.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/util/system.cpp b/src/util/system.cpp
index a411b73a16..9f8035948b 100644
--- a/src/util/system.cpp
+++ b/src/util/system.cpp
@@ -427,6 +427,14 @@ bool ArgsManager::ReadSettingsFile(std::vector<std::string>* errors)
SaveErrors(read_errors, errors);
return false;
}
+ for (const auto& setting : m_settings.rw_settings) {
+ std::string section;
+ std::string key = setting.first;
+ (void)InterpretOption(section, key, /* value */ {}); // Split setting key into section and argname
+ if (!GetArgFlags('-' + key)) {
+ LogPrintf("Ignoring unknown rw_settings value %s\n", setting.first);
+ }
+ }
return true;
}