aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2018-07-30 00:14:18 -0700
committerPieter Wuille <pieter.wuille@gmail.com>2018-07-30 00:35:44 -0700
commit04ce0d88ca146962311743812a18819ae55fc9ae (patch)
tree0581c9c029bffec3b333bfe5f6cd37c1e87e3e03
parent222e627322ce4de3292259a4868d23983f2a5394 (diff)
downloadbitcoin-04ce0d88ca146962311743812a18819ae55fc9ae.tar.xz
Report when unknown config file options are ignored
-rw-r--r--src/util.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/util.cpp b/src/util.cpp
index 2f81f50a71..238554ee4a 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -859,9 +859,13 @@ bool ArgsManager::ReadConfigStream(std::istream& stream, std::string& error, boo
}
// Check that the arg is known
- if (!IsArgKnown(strKey) && !ignore_invalid_keys) {
- error = strprintf("Invalid configuration value %s", option.first.c_str());
- return false;
+ if (!IsArgKnown(strKey)) {
+ if (!ignore_invalid_keys) {
+ error = strprintf("Invalid configuration value %s", option.first.c_str());
+ return false;
+ } else {
+ LogPrintf("Ignoring unknown configuration value %s\n", option.first);
+ }
}
}
return true;