Merge #14272: init: Remove deprecated args from hidden args
fa910e4301
init: Remove deprecated args from hidden args (MarcoFalke)
Pull request description:
The args have been deprecated since 0.17 (maybe longer) and since we reject unknown args, there is no need to add deprecated args to the list of hidden args and then hand-craft an error message if a user provides them.
Tree-SHA512: 3a3191439ab0d7969fb72801d097bd86998524f84b3819380224f746cbe4b0f57beec1ad34744424f6587038035b0ddf418ad13171a8d9c3b97b4f3b7b3222a3
This commit is contained in:
commit
9a3a984bb8
4 changed files with 3 additions and 34 deletions
|
@ -139,11 +139,6 @@ static int AppInitRPC(int argc, char* argv[])
|
|||
fprintf(stderr, "Error: %s\n", e.what());
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
if (gArgs.GetBoolArg("-rpcssl", false))
|
||||
{
|
||||
fprintf(stderr, "Error: SSL mode for RPC (-rpcssl) is no longer supported.\n");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
return CONTINUE_EXECUTION;
|
||||
}
|
||||
|
||||
|
|
|
@ -352,13 +352,6 @@ bool InitHTTPServer()
|
|||
if (!InitHTTPAllowList())
|
||||
return false;
|
||||
|
||||
if (gArgs.GetBoolArg("-rpcssl", false)) {
|
||||
uiInterface.ThreadSafeMessageBox(
|
||||
"SSL mode for RPC (-rpcssl) is no longer supported.",
|
||||
"", CClientUIInterface::MSG_ERROR);
|
||||
return false;
|
||||
}
|
||||
|
||||
// Redirect libevent's logging to our own log
|
||||
event_set_log_callback(&libevent_log_cb);
|
||||
// Update libevent's log handling. Returns false if our version of
|
||||
|
|
23
src/init.cpp
23
src/init.cpp
|
@ -322,8 +322,8 @@ void SetupServerArgs()
|
|||
const auto regtestChainParams = CreateChainParams(CBaseChainParams::REGTEST);
|
||||
|
||||
// Hidden Options
|
||||
std::vector<std::string> hidden_args = {"-rpcssl", "-benchmark", "-h", "-help", "-socks", "-tor", "-debugnet", "-whitelistalwaysrelay",
|
||||
"-prematurewitness", "-walletprematurewitness", "-promiscuousmempoolflags", "-blockminsize", "-dbcrashratio", "-forcecompactdb", "-usehd",
|
||||
std::vector<std::string> hidden_args = {"-h", "-help",
|
||||
"-dbcrashratio", "-forcecompactdb", "-usehd",
|
||||
// GUI args. These will be overwritten by SetupUIArgs for the GUI
|
||||
"-allowselfsignedrootcertificates", "-choosedatadir", "-lang=<lang>", "-min", "-resetguisettings", "-rootcertificates=<file>", "-splash", "-uiplatform"};
|
||||
|
||||
|
@ -961,25 +961,6 @@ bool AppInitParameterInteraction()
|
|||
}
|
||||
}
|
||||
|
||||
// Check for -debugnet
|
||||
if (gArgs.GetBoolArg("-debugnet", false))
|
||||
InitWarning(_("Unsupported argument -debugnet ignored, use -debug=net."));
|
||||
// Check for -socks - as this is a privacy risk to continue, exit here
|
||||
if (gArgs.IsArgSet("-socks"))
|
||||
return InitError(_("Unsupported argument -socks found. Setting SOCKS version isn't possible anymore, only SOCKS5 proxies are supported."));
|
||||
// Check for -tor - as this is a privacy risk to continue, exit here
|
||||
if (gArgs.GetBoolArg("-tor", false))
|
||||
return InitError(_("Unsupported argument -tor found, use -onion."));
|
||||
|
||||
if (gArgs.GetBoolArg("-benchmark", false))
|
||||
InitWarning(_("Unsupported argument -benchmark ignored, use -debug=bench."));
|
||||
|
||||
if (gArgs.GetBoolArg("-whitelistalwaysrelay", false))
|
||||
InitWarning(_("Unsupported argument -whitelistalwaysrelay ignored, use -whitelistrelay and/or -whitelistforcerelay."));
|
||||
|
||||
if (gArgs.IsArgSet("-blockminsize"))
|
||||
InitWarning("Unsupported argument -blockminsize ignored.");
|
||||
|
||||
// Checkmempool and checkblockindex default to true in regtest mode
|
||||
int ratio = std::min<int>(std::max<int>(gArgs.GetArg("-checkmempool", chainparams.DefaultConsistencyChecks() ? 1 : 0), 0), 1000000);
|
||||
if (ratio != 0) {
|
||||
|
|
|
@ -22,7 +22,7 @@ CMD_ROOT_DIR = '`git rev-parse --show-toplevel`/{}'.format(FOLDER_GREP)
|
|||
CMD_GREP_ARGS = r"git grep --perl-regexp '{}' -- {} ':(exclude){}'".format(REGEX_ARG, CMD_ROOT_DIR, FOLDER_TEST)
|
||||
CMD_GREP_DOCS = r"git grep --perl-regexp '{}' {}".format(REGEX_DOC, CMD_ROOT_DIR)
|
||||
# list unsupported, deprecated and duplicate args as they need no documentation
|
||||
SET_DOC_OPTIONAL = set(['-rpcssl', '-benchmark', '-h', '-help', '-socks', '-tor', '-debugnet', '-whitelistalwaysrelay', '-promiscuousmempoolflags', '-blockminsize', '-dbcrashratio', '-forcecompactdb', '-usehd'])
|
||||
SET_DOC_OPTIONAL = set(['-h', '-help', '-dbcrashratio', '-forcecompactdb', '-usehd'])
|
||||
|
||||
|
||||
def main():
|
||||
|
|
Loading…
Add table
Reference in a new issue