mirror of
https://github.com/bitcoin/bitcoin.git
synced 2024-11-20 10:38:42 +01:00
Report when unknown config file options are ignored
This commit is contained in:
parent
222e627322
commit
04ce0d88ca
10
src/util.cpp
10
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;
|
||||
|
Loading…
Reference in New Issue
Block a user