Changeset View
Changeset View
Standalone View
Standalone View
src/rpc/server.cpp
Show First 20 Lines • Show All 176 Lines • ▼ Show 20 Lines | |||||
} | } | ||||
static UniValue help(Config &config, const JSONRPCRequest &jsonRequest) { | static UniValue help(Config &config, const JSONRPCRequest &jsonRequest) { | ||||
if (jsonRequest.fHelp || jsonRequest.params.size() > 1) { | if (jsonRequest.fHelp || jsonRequest.params.size() > 1) { | ||||
throw std::runtime_error(RPCHelpMan{ | throw std::runtime_error(RPCHelpMan{ | ||||
"help", | "help", | ||||
"\nList all commands, or get help for a specified command.\n", | "\nList all commands, or get help for a specified command.\n", | ||||
{ | { | ||||
{"command", RPCArg::Type::STR, /* opt */ true, | {"command", RPCArg::Type::STR, /* default */ "all commands", | ||||
/* default_val */ "all commands", | |||||
"The command to get help on"}, | "The command to get help on"}, | ||||
}, | }, | ||||
RPCResult{"\"text\" (string) The help text\n"}, | RPCResult{"\"text\" (string) The help text\n"}, | ||||
RPCExamples{""}, | RPCExamples{""}, | ||||
} | } | ||||
.ToString()); | .ToString()); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 343 Lines • Show Last 20 Lines |