diff options
author | Russell Yanofsky <russ@yanofsky.org> | 2019-11-07 22:08:22 -0500 |
---|---|---|
committer | Russell Yanofsky <russ@yanofsky.org> | 2019-11-07 22:08:22 -0500 |
commit | e2e37cfe8af088bd8ea884be2f79f0f3cac555d5 (patch) | |
tree | 40c69485d99a52ca6119f1e4d51b44578174b677 /src/util | |
parent | 5a84aa880f6da0bac0e2144733fdef3b8558c761 (diff) |
Remove includeconf nested scope
Easier to review ignoring whitespace
Suggestion from John Newbery <john@johnnewbery.com> in
https://github.com/bitcoin/bitcoin/pull/15934#discussion_r343806860
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/system.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/util/system.cpp b/src/util/system.cpp index 67c7694944..ed56e73960 100644 --- a/src/util/system.cpp +++ b/src/util/system.cpp @@ -939,15 +939,13 @@ bool ArgsManager::ReadConfigFiles(std::string& error, bool ignore_invalid_keys) // Warn about recursive -includeconf conf_file_names = GetArgs("-includeconf"); - { - std::vector<std::string> includeconf_net(GetArgs(std::string("-") + chain_id + ".includeconf")); + std::vector<std::string> includeconf_net(GetArgs(std::string("-") + chain_id + ".includeconf")); + conf_file_names.insert(conf_file_names.end(), includeconf_net.begin(), includeconf_net.end()); + std::string chain_id_final = GetChainName(); + if (chain_id_final != chain_id) { + // Also warn about recursive includeconf for the chain that was specified in one of the includeconfs + includeconf_net = GetArgs(std::string("-") + chain_id_final + ".includeconf"); conf_file_names.insert(conf_file_names.end(), includeconf_net.begin(), includeconf_net.end()); - std::string chain_id_final = GetChainName(); - if (chain_id_final != chain_id) { - // Also warn about recursive includeconf for the chain that was specified in one of the includeconfs - includeconf_net = GetArgs(std::string("-") + chain_id_final + ".includeconf"); - conf_file_names.insert(conf_file_names.end(), includeconf_net.begin(), includeconf_net.end()); - } } for (const std::string& conf_file_name : conf_file_names) { tfm::format(std::cerr, "warning: -includeconf cannot be used from included files; ignoring -includeconf=%s\n", conf_file_name); |