| 379 | } |
| 380 | |
| 381 | void ArgsManager::WarnForSectionOnlyArgs() |
| 382 | { |
| 383 | // if there's no section selected, don't worry |
| 384 | if (m_network.empty()) return; |
| 385 | |
| 386 | // if it's okay to use the default section for this network, don't worry |
| 387 | if (m_network == CBaseChainParams::MAIN) return; |
| 388 | |
| 389 | for (const auto& arg : m_network_only_args) { |
| 390 | std::pair<bool, std::string> found_result; |
| 391 | |
| 392 | // if this option is overridden it's fine |
| 393 | found_result = ArgsManagerHelper::GetArgHelper(m_override_args, arg); |
| 394 | if (found_result.first) continue; |
| 395 | |
| 396 | // if there's a network-specific value for this option, it's fine |
| 397 | found_result = ArgsManagerHelper::GetArgHelper(m_config_args, ArgsManagerHelper::NetworkArg(*this, arg)); |
| 398 | if (found_result.first) continue; |
| 399 | |
| 400 | // if there isn't a default value for this option, it's fine |
| 401 | found_result = ArgsManagerHelper::GetArgHelper(m_config_args, arg); |
| 402 | if (!found_result.first) continue; |
| 403 | |
| 404 | // otherwise, issue a warning |
| 405 | LogPrintf("Warning: Config setting for %s only applied on %s network when in [%s] section.\n", arg, m_network, m_network); |
| 406 | } |
| 407 | } |
| 408 | |
| 409 | void ArgsManager::SelectConfigNetwork(const std::string& network) |
| 410 | { |
no test coverage detected