merge bitcoin#16240: JSONRPCRequest-aware RPCHelpMan

This commit is contained in:
Kittywhiskers Van Gogh 2022-06-10 17:02:49 +05:30
parent 21f5405e4a
commit 9e50d3a159

View File

@ -1075,8 +1075,6 @@ static UniValue getspentinfo(const JSONRPCRequest& request)
static UniValue mockscheduler(const JSONRPCRequest& request)
{
if (request.fHelp || request.params.size() != 1)
throw std::runtime_error(
RPCHelpMan{"mockscheduler",
"\nBump the scheduler into the future (-regtest only)\n",
{
@ -1084,7 +1082,7 @@ static UniValue mockscheduler(const JSONRPCRequest& request)
},
RPCResults{},
RPCExamples{""},
}.ToString());
}.Check(request);
if (!Params().IsMockableChain()) {
throw std::runtime_error("mockscheduler is for regression testing (-regtest mode) only");