Merge b46fb5cb10 into merged_master (Bitcoin PR #19131)

This commit is contained in:
Andrew Poelstra 2020-11-26 01:08:58 +00:00
commit b8d665f61a
4 changed files with 16 additions and 4 deletions

View file

@ -1013,12 +1013,17 @@ bool AppInitParameterInteraction()
// also see: InitParameterInteraction()
// Warn if network-specific options (-addnode, -connect, etc) are
// Error if network-specific options (-addnode, -connect, etc) are
// specified in default section of config file, but not overridden
// on the command line or in this network's section of the config file.
std::string network = gArgs.GetChainName();
bilingual_str errors;
for (const auto& arg : gArgs.GetUnsuitableSectionOnlyArgs()) {
return InitError(strprintf(_("Config setting for %s only applied on %s network when in [%s] section."), arg, network, network));
errors += strprintf(_("Config setting for %s only applied on %s network when in [%s] section.") + Untranslated("\n"), arg, network, network);
}
if (!errors.empty()) {
return InitError(errors);
}
if (!fs::is_directory(GetBlocksDir())) {