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,16 +1075,14 @@ 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",
RPCHelpMan{"mockscheduler",
"\nBump the scheduler into the future (-regtest only)\n",
{
{"delta_time", RPCArg::Type::NUM, RPCArg::Optional::NO, "Number of seconds to forward the scheduler into the future." },
},
RPCResults{},
RPCExamples{""},
}.ToString());
}.Check(request);
if (!Params().IsMockableChain()) {
throw std::runtime_error("mockscheduler is for regression testing (-regtest mode) only");