aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPieter Wuille <[email protected]>2018-07-30 00:14:18 -0700
committerPieter Wuille <[email protected]>2018-07-30 00:35:44 -0700
commit04ce0d88ca146962311743812a18819ae55fc9ae (patch)
tree0581c9c029bffec3b333bfe5f6cd37c1e87e3e03 /src
parentdoc: Add historical release notes for 0.16.2 (diff)
downloaddiscoin-04ce0d88ca146962311743812a18819ae55fc9ae.tar.xz
discoin-04ce0d88ca146962311743812a18819ae55fc9ae.zip
Report when unknown config file options are ignored
Diffstat (limited to 'src')
-rw-r--r--src/util.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/util.cpp b/src/util.cpp
index 2f81f50a7..238554ee4 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;