aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/server.cpp
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2018-10-20 08:19:44 -0400
committerMarcoFalke <falke.marco@gmail.com>2018-11-14 15:33:15 -0500
commitfa91e8eda541acdb78ca481b74605639f319c108 (patch)
treec6f299e2daa4c2428ca2039a538b4686a1c1d5f6 /src/rpc/server.cpp
parentfa520e72f7b5964cea1ade666e71212914556cf3 (diff)
downloadbitcoin-fa91e8eda541acdb78ca481b74605639f319c108.tar.xz
Use RPCHelpMan for all RPCs
Diffstat (limited to 'src/rpc/server.cpp')
-rw-r--r--src/rpc/server.cpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/rpc/server.cpp b/src/rpc/server.cpp
index f890baba51..c565094a10 100644
--- a/src/rpc/server.cpp
+++ b/src/rpc/server.cpp
@@ -204,8 +204,12 @@ UniValue help(const JSONRPCRequest& jsonRequest)
{
if (jsonRequest.fHelp || jsonRequest.params.size() > 1)
throw std::runtime_error(
- "help ( \"command\" )\n"
- "\nList all commands, or get help for a specified command.\n"
+ RPCHelpMan{"help",
+ "\nList all commands, or get help for a specified command.\n",
+ {
+ {"command", RPCArg::Type::STR, true},
+ }}
+ .ToString() +
"\nArguments:\n"
"1. \"command\" (string, optional) The command to get help on\n"
"\nResult:\n"
@@ -225,8 +229,9 @@ UniValue stop(const JSONRPCRequest& jsonRequest)
// Accept the deprecated and ignored 'detach' boolean argument
if (jsonRequest.fHelp || jsonRequest.params.size() > 1)
throw std::runtime_error(
- "stop\n"
- "\nStop Bitcoin server.");
+ RPCHelpMan{"stop",
+ "\nStop Bitcoin server.", {}}
+ .ToString());
// Event loop will exit after current HTTP requests have been handled, so
// this reply will get back to the client.
StartShutdown();
@@ -237,8 +242,9 @@ static UniValue uptime(const JSONRPCRequest& jsonRequest)
{
if (jsonRequest.fHelp || jsonRequest.params.size() > 0)
throw std::runtime_error(
- "uptime\n"
- "\nReturns the total uptime of the server.\n"
+ RPCHelpMan{"uptime",
+ "\nReturns the total uptime of the server.\n", {}}
+ .ToString() +
"\nResult:\n"
"ttt (numeric) The number of seconds that the server has been running\n"
"\nExamples:\n"