Report when unknown config file options are ignored

This commit is contained in:
Pieter Wuille 2018-07-30 00:14:18 -07:00
parent 222e627322
commit 04ce0d88ca

View file

@ -859,9 +859,13 @@ bool ArgsManager::ReadConfigStream(std::istream& stream, std::string& error, boo
} }
// Check that the arg is known // Check that the arg is known
if (!IsArgKnown(strKey) && !ignore_invalid_keys) { if (!IsArgKnown(strKey)) {
error = strprintf("Invalid configuration value %s", option.first.c_str()); if (!ignore_invalid_keys) {
return false; error = strprintf("Invalid configuration value %s", option.first.c_str());
return false;
} else {
LogPrintf("Ignoring unknown configuration value %s\n", option.first);
}
} }
} }
return true; return true;