From 04ce0d88ca146962311743812a18819ae55fc9ae Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Mon, 30 Jul 2018 00:14:18 -0700 Subject: Report when unknown config file options are ignored --- src/util.cpp | 10 +++++++--- 1 file 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; -- cgit v1.2.3