Changeset View
Changeset View
Standalone View
Standalone View
src/rpc/server.cpp
Show First 20 Lines • Show All 285 Lines • ▼ Show 20 Lines | if (jsonRequest.fHelp || jsonRequest.params.size() > 1) { | ||||
throw std::runtime_error( | throw std::runtime_error( | ||||
RPCHelpMan{ | 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, /* opt */ true, | ||||
/* default_val */ "", "The command to get help on"}, | /* default_val */ "", "The command to get help on"}, | ||||
}} | }} | ||||
.ToStringWithArgs() + | .ToString() + | ||||
"\nResult:\n" | "\nResult:\n" | ||||
"\"text\" (string) The help text\n"); | "\"text\" (string) The help text\n"); | ||||
} | } | ||||
std::string strCommand; | std::string strCommand; | ||||
if (jsonRequest.params.size() > 0) { | if (jsonRequest.params.size() > 0) { | ||||
strCommand = jsonRequest.params[0].get_str(); | strCommand = jsonRequest.params[0].get_str(); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 336 Lines • Show Last 20 Lines |