diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2018-07-30 00:14:18 -0700 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2018-07-30 00:35:44 -0700 |
commit | 04ce0d88ca146962311743812a18819ae55fc9ae (patch) | |
tree | 0581c9c029bffec3b333bfe5f6cd37c1e87e3e03 /src/util.cpp | |
parent | 222e627322ce4de3292259a4868d23983f2a5394 (diff) |
Report when unknown config file options are ignored
Diffstat (limited to 'src/util.cpp')
-rw-r--r-- | src/util.cpp | 10 |
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; |