|
|
@ -741,7 +741,7 @@ void InitParameterInteraction() |
|
|
|
LogPrintf("%s: parameter interaction: -whitebind set -> setting -listen=1\n", __func__); |
|
|
|
LogPrintf("%s: parameter interaction: -whitebind set -> setting -listen=1\n", __func__); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (gArgs.IsArgSet("-connect") && gArgs.GetArgs("-connect").size() > 0) { |
|
|
|
if (gArgs.IsArgSet("-connect")) { |
|
|
|
// when only connecting to trusted nodes, do not seed via DNS, or listen by default
|
|
|
|
// when only connecting to trusted nodes, do not seed via DNS, or listen by default
|
|
|
|
if (SoftSetBoolArg("-dnsseed", false)) |
|
|
|
if (SoftSetBoolArg("-dnsseed", false)) |
|
|
|
LogPrintf("%s: parameter interaction: -connect set -> setting -dnsseed=0\n", __func__); |
|
|
|
LogPrintf("%s: parameter interaction: -connect set -> setting -dnsseed=0\n", __func__); |
|
|
@ -911,9 +911,9 @@ bool AppInitParameterInteraction() |
|
|
|
InitWarning(strprintf(_("Reducing -maxconnections from %d to %d, because of system limitations."), nUserMaxConnections, nMaxConnections)); |
|
|
|
InitWarning(strprintf(_("Reducing -maxconnections from %d to %d, because of system limitations."), nUserMaxConnections, nMaxConnections)); |
|
|
|
|
|
|
|
|
|
|
|
// ********************************************************* Step 3: parameter-to-internal-flags
|
|
|
|
// ********************************************************* Step 3: parameter-to-internal-flags
|
|
|
|
if (gArgs.IsArgSet("-debug") > 0) { |
|
|
|
if (gArgs.IsArgSet("-debug")) { |
|
|
|
// Special-case: if -debug=0/-nodebug is set, turn off debugging messages
|
|
|
|
// Special-case: if -debug=0/-nodebug is set, turn off debugging messages
|
|
|
|
const std::vector<std::string>& categories = gArgs.GetArgs("-debug"); |
|
|
|
const std::vector<std::string> categories = gArgs.GetArgs("-debug"); |
|
|
|
|
|
|
|
|
|
|
|
if (find(categories.begin(), categories.end(), std::string("0")) == categories.end()) { |
|
|
|
if (find(categories.begin(), categories.end(), std::string("0")) == categories.end()) { |
|
|
|
for (const auto& cat : categories) { |
|
|
|
for (const auto& cat : categories) { |
|
|
@ -928,9 +928,8 @@ bool AppInitParameterInteraction() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Now remove the logging categories which were explicitly excluded
|
|
|
|
// Now remove the logging categories which were explicitly excluded
|
|
|
|
if (gArgs.IsArgSet("-debugexclude") > 0) { |
|
|
|
if (gArgs.IsArgSet("-debugexclude")) { |
|
|
|
const std::vector<std::string>& excludedCategories = gArgs.GetArgs("-debugexclude"); |
|
|
|
for (const std::string& cat : gArgs.GetArgs("-debugexclude")) { |
|
|
|
for (const auto& cat : excludedCategories) { |
|
|
|
|
|
|
|
uint32_t flag = 0; |
|
|
|
uint32_t flag = 0; |
|
|
|
if (!GetLogCategory(&flag, &cat)) { |
|
|
|
if (!GetLogCategory(&flag, &cat)) { |
|
|
|
InitWarning(strprintf(_("Unsupported logging category %s=%s."), "-debugexclude", cat)); |
|
|
|
InitWarning(strprintf(_("Unsupported logging category %s=%s."), "-debugexclude", cat)); |
|
|
@ -1105,10 +1104,9 @@ bool AppInitParameterInteraction() |
|
|
|
if (!chainparams.MineBlocksOnDemand()) { |
|
|
|
if (!chainparams.MineBlocksOnDemand()) { |
|
|
|
return InitError("BIP9 parameters may only be overridden on regtest."); |
|
|
|
return InitError("BIP9 parameters may only be overridden on regtest."); |
|
|
|
} |
|
|
|
} |
|
|
|
const std::vector<std::string>& deployments = gArgs.GetArgs("-bip9params"); |
|
|
|
for (const std::string& strDeployment : gArgs.GetArgs("-bip9params")) { |
|
|
|
for (auto i : deployments) { |
|
|
|
|
|
|
|
std::vector<std::string> vDeploymentParams; |
|
|
|
std::vector<std::string> vDeploymentParams; |
|
|
|
boost::split(vDeploymentParams, i, boost::is_any_of(":")); |
|
|
|
boost::split(vDeploymentParams, strDeployment, boost::is_any_of(":")); |
|
|
|
if (vDeploymentParams.size() != 3) { |
|
|
|
if (vDeploymentParams.size() != 3) { |
|
|
|
return InitError("BIP9 parameters malformed, expecting deployment:start:end"); |
|
|
|
return InitError("BIP9 parameters malformed, expecting deployment:start:end"); |
|
|
|
} |
|
|
|
} |
|
|
|