rpc: Pass argument descriptions to RPCHelpMan

This commit is contained in:
MarcoFalke
2018-11-23 11:21:38 -05:00
parent 8c119b2755
commit 1db0096f61
10 changed files with 783 additions and 1034 deletions

View File

@@ -142,10 +142,6 @@ std::vector<unsigned char> ParseHexO(const UniValue& o, std::string strKey)
return ParseHexV(find_value(o, strKey), strKey);
}
/**
* Note: This interface may still be subject to change.
*/
std::string CRPCTable::help(const std::string& strCommand, const JSONRPCRequest& helpreq) const
{
std::string strRet;
@@ -207,11 +203,9 @@ UniValue help(const JSONRPCRequest& jsonRequest)
RPCHelpMan{"help",
"\nList all commands, or get help for a specified command.\n",
{
{"command", RPCArg::Type::STR, true},
{"command", RPCArg::Type::STR, /* opt */ true, /* default_val */ "", "The command to get help on"},
}}
.ToString() +
"\nArguments:\n"
"1. \"command\" (string, optional) The command to get help on\n"
"\nResult:\n"
"\"text\" (string) The help text\n"
);
@@ -256,9 +250,6 @@ static UniValue uptime(const JSONRPCRequest& jsonRequest)
}
// clang-format off
/**
* Call Table
*/
static const CRPCCommand vRPCCommands[] =
{ // category name actor (function) argNames
// --------------------- ------------------------ ----------------------- ----------