Report when unknown config file options are ignored

This commit is contained in:
Pieter Wuille committed 2018-07-30 00:35:44 -07:00
1 parent 222e627322
commit 04ce0d88ca
1 file changed
+7 -3
+7 -3
View File
@@ -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;