mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 04:22:55 +01:00
refactor: Drop args that were deprecated long time ago (#4762)
Trying to use them results in "Error parsing command line arguments: Invalid parameter" error. Should either add them to hidden_args or drop them. The latter seems like a better option since no one should be using them by now anyway.
This commit is contained in:
parent
eec6c13dd0
commit
0ea2d5aaf5
22
src/init.cpp
22
src/init.cpp
@ -1130,12 +1130,6 @@ void InitParameterInteraction()
|
||||
LogPrintf("%s: parameter interaction: -whitelistforcerelay=1 -> setting -whitelistrelay=1\n", __func__);
|
||||
}
|
||||
|
||||
if (gArgs.GetBoolArg("-litemode", false)) {
|
||||
if (gArgs.SoftSetBoolArg("-disablegovernance", true)) {
|
||||
LogPrintf("%s: parameter interaction: -litemode=true -> setting -disablegovernance=true\n", __func__);
|
||||
}
|
||||
}
|
||||
|
||||
int64_t nPruneArg = gArgs.GetArg("-prune", 0);
|
||||
if (nPruneArg > 0) {
|
||||
if (gArgs.SoftSetBoolArg("-disablegovernance", true)) {
|
||||
@ -1529,14 +1523,6 @@ bool AppInitParameterInteraction()
|
||||
return InitError(Untranslated(e.what()));
|
||||
}
|
||||
|
||||
if (gArgs.IsArgSet("-maxorphantx")) {
|
||||
InitWarning(Untranslated("-maxorphantx is not supported anymore. Use -maxorphantxsize instead."));
|
||||
}
|
||||
|
||||
if (gArgs.IsArgSet("-masternode")) {
|
||||
InitWarning(_("-masternode option is deprecated and ignored, specifying -masternodeblsprivkey is enough to start this node as a masternode."));
|
||||
}
|
||||
|
||||
if (gArgs.IsArgSet("-masternodeblsprivkey")) {
|
||||
if (!gArgs.GetBoolArg("-listen", DEFAULT_LISTEN) && Params().RequireRoutableExternalIP()) {
|
||||
return InitError(Untranslated("Masternode must accept connections from outside, set -listen=1"));
|
||||
@ -1558,14 +1544,6 @@ bool AppInitParameterInteraction()
|
||||
}
|
||||
}
|
||||
|
||||
if (gArgs.IsArgSet("-litemode")) {
|
||||
InitWarning(_("-litemode is deprecated.") +
|
||||
(gArgs.GetBoolArg("-litemode", false) ?
|
||||
(Untranslated(" ") + _("Its replacement -disablegovernance has been forced instead.")) :
|
||||
(Untranslated(" ") + _("It has been replaced by -disablegovernance."))));
|
||||
gArgs.ForceRemoveArg("-litemode");
|
||||
}
|
||||
|
||||
fDisableGovernance = gArgs.GetBoolArg("-disablegovernance", false);
|
||||
LogPrintf("fDisableGovernance %d\n", fDisableGovernance);
|
||||
|
||||
|
@ -158,73 +158,6 @@ bool WalletInit::ParameterInteraction() const
|
||||
gArgs.ForceRemoveArg("-mnemonicpassphrase");
|
||||
}
|
||||
|
||||
// begin PrivateSend -> CoinJoin migration
|
||||
if (gArgs.IsArgSet("-privatesendrounds")) {
|
||||
int nRoundsDeprecated = gArgs.GetArg("-privatesendrounds", DEFAULT_COINJOIN_ROUNDS);
|
||||
InitWarning(strprintf(_("Warning: %s is deprecated, please use %s instead"), "-privatesendrounds", "-coinjoinrounds"));
|
||||
if (gArgs.SoftSetArg("-coinjoinrounds", itostr(nRoundsDeprecated))) {
|
||||
LogPrintf("%s: parameter interaction: -privatesendrounds=%d -> setting -coinjoinrounds=%d\n", __func__, nRoundsDeprecated, nRoundsDeprecated);
|
||||
}
|
||||
gArgs.ForceRemoveArg("-privatesendrounds");
|
||||
}
|
||||
if (gArgs.IsArgSet("-privatesendamount")) {
|
||||
int nAmountDeprecated = gArgs.GetArg("-privatesendamount", DEFAULT_COINJOIN_AMOUNT);
|
||||
InitWarning(strprintf(_("Warning: %s is deprecated, please use %s instead"), "-privatesendamount", "-coinjoinamount"));
|
||||
if (gArgs.SoftSetArg("-coinjoinamount", itostr(nAmountDeprecated))) {
|
||||
LogPrintf("%s: parameter interaction: -privatesendamount=%d -> setting -coinjoinamount=%d\n", __func__, nAmountDeprecated, nAmountDeprecated);
|
||||
}
|
||||
gArgs.ForceRemoveArg("-privatesendamount");
|
||||
}
|
||||
if (gArgs.IsArgSet("-privatesenddenomsgoal")) {
|
||||
int nDenomsGoalDeprecated = gArgs.GetArg("-privatesenddenomsgoal", DEFAULT_COINJOIN_DENOMS_GOAL);
|
||||
InitWarning(strprintf(_("Warning: %s is deprecated, please use %s instead"), "-privatesenddenomsgoal", "-coinjoindenomsgoal"));
|
||||
if (gArgs.SoftSetArg("-coinjoindenomsgoal", itostr(nDenomsGoalDeprecated))) {
|
||||
LogPrintf("%s: parameter interaction: -privatesenddenomsgoal=%d -> setting -coinjoindenomsgoal=%d\n", __func__, nDenomsGoalDeprecated, nDenomsGoalDeprecated);
|
||||
}
|
||||
gArgs.ForceRemoveArg("-privatesenddenomsgoal");
|
||||
}
|
||||
if (gArgs.IsArgSet("-privatesenddenomshardcap")) {
|
||||
int nDenomsHardcapDeprecated = gArgs.GetArg("-privatesenddenomshardcap", DEFAULT_COINJOIN_DENOMS_HARDCAP);
|
||||
InitWarning(strprintf(_("Warning: %s is deprecated, please use %s instead"), "-privatesenddenomshardcap", "-coinjoindenomshardcap"));
|
||||
if (gArgs.SoftSetArg("-coinjoindenomshardcap", itostr(nDenomsHardcapDeprecated))) {
|
||||
LogPrintf("%s: parameter interaction: -privatesenddenomshardcap=%d -> setting -coinjoindenomshardcap=%d\n", __func__, nDenomsHardcapDeprecated, nDenomsHardcapDeprecated);
|
||||
}
|
||||
gArgs.ForceRemoveArg("-privatesenddenomshardcap");
|
||||
}
|
||||
if (gArgs.IsArgSet("-privatesendsessions")) {
|
||||
int nSessionsDeprecated = gArgs.GetArg("-privatesendsessions", DEFAULT_COINJOIN_SESSIONS);
|
||||
InitWarning(strprintf(_("Warning: %s is deprecated, please use %s instead"), "-privatesendsessions", "-coinjoinsessions"));
|
||||
if (gArgs.SoftSetArg("-coinjoinsessions", itostr(nSessionsDeprecated))) {
|
||||
LogPrintf("%s: parameter interaction: -privatesendsessions=%d -> setting -coinjoinsessions=%d\n", __func__, nSessionsDeprecated, nSessionsDeprecated);
|
||||
}
|
||||
gArgs.ForceRemoveArg("-privatesendsessions");
|
||||
}
|
||||
if (gArgs.IsArgSet("-enableprivatesend")) {
|
||||
bool fEnablePSDeprecated = gArgs.GetBoolArg("-enableprivatesend", 0);
|
||||
InitWarning(strprintf(_("Warning: %s is deprecated, please use %s instead"), "-enableprivatesend", "-enablecoinjoin"));
|
||||
if (gArgs.SoftSetBoolArg("-enablecoinjoin", fEnablePSDeprecated)) {
|
||||
LogPrintf("%s: parameter interaction: -enableprivatesend=%d -> setting -enablecoinjoin=%d\n", __func__, fEnablePSDeprecated, fEnablePSDeprecated);
|
||||
}
|
||||
gArgs.ForceRemoveArg("-enableprivatesend");
|
||||
}
|
||||
if (gArgs.IsArgSet("-privatesendautostart")) {
|
||||
bool fAutoStartDeprecated = gArgs.GetBoolArg("-privatesendautostart", DEFAULT_COINJOIN_AUTOSTART);
|
||||
InitWarning(strprintf(_("Warning: %s is deprecated, please use %s instead"), "-privatesendautostart", "-coinjoinautostart"));
|
||||
if (gArgs.SoftSetBoolArg("-coinjoinautostart", fAutoStartDeprecated)) {
|
||||
LogPrintf("%s: parameter interaction: -privatesendautostart=%d -> setting -coinjoinautostart=%d\n", __func__, fAutoStartDeprecated, fAutoStartDeprecated);
|
||||
}
|
||||
gArgs.ForceRemoveArg("-privatesendautostart");
|
||||
}
|
||||
if (gArgs.IsArgSet("-privatesendmultisession")) {
|
||||
bool fMultiSessionDeprecated = gArgs.GetBoolArg("-privatesendmultisession", DEFAULT_COINJOIN_MULTISESSION);
|
||||
InitWarning(strprintf(_("Warning: %s is deprecated, please use %s instead"), "-privatesendmultisession", "-coinjoinmultisession"));
|
||||
if (gArgs.SoftSetBoolArg("-coinjoinmultisession", fMultiSessionDeprecated)) {
|
||||
LogPrintf("%s: parameter interaction: -privatesendmultisession=%d -> setting -coinjoinmultisession=%d\n", __func__, fMultiSessionDeprecated, fMultiSessionDeprecated);
|
||||
}
|
||||
gArgs.ForceRemoveArg("-privatesendmultisession");
|
||||
}
|
||||
// end PrivateSend -> CoinJoin migration
|
||||
|
||||
if (gArgs.GetArg("-coinjoindenomshardcap", DEFAULT_COINJOIN_DENOMS_HARDCAP) < gArgs.GetArg("-coinjoindenomsgoal", DEFAULT_COINJOIN_DENOMS_GOAL)) {
|
||||
return InitError(strprintf(_("%s can't be lower than %s"), "-coinjoindenomshardcap", "-coinjoindenomsgoal"));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user