rpc: fix RPC help requirements for getblocktemplate

First argument is optional, and defaults to {mode:template}.
This commit is contained in:
Karl-Johan Alm 2019-06-19 16:49:38 +09:00
parent e06067387e
commit 0ab8ba1ac6
No known key found for this signature in database
GPG Key ID: 57AF762DB3353322

View File

@ -302,7 +302,7 @@ static UniValue getblocktemplate(const JSONRPCRequest& request)
" https://github.com/bitcoin/bips/blob/master/bip-0009.mediawiki#getblocktemplate_changes\n" " https://github.com/bitcoin/bips/blob/master/bip-0009.mediawiki#getblocktemplate_changes\n"
" https://github.com/bitcoin/bips/blob/master/bip-0145.mediawiki\n", " https://github.com/bitcoin/bips/blob/master/bip-0145.mediawiki\n",
{ {
{"template_request", RPCArg::Type::OBJ, RPCArg::Optional::NO, "A json object in the following spec", {"template_request", RPCArg::Type::OBJ, "{}", "A json object in the following spec",
{ {
{"mode", RPCArg::Type::STR, /* treat as named arg */ RPCArg::Optional::OMITTED_NAMED_ARG, "This must be set to \"template\", \"proposal\" (see BIP 23), or omitted"}, {"mode", RPCArg::Type::STR, /* treat as named arg */ RPCArg::Optional::OMITTED_NAMED_ARG, "This must be set to \"template\", \"proposal\" (see BIP 23), or omitted"},
{"capabilities", RPCArg::Type::ARR, /* treat as named arg */ RPCArg::Optional::OMITTED_NAMED_ARG, "A list of strings", {"capabilities", RPCArg::Type::ARR, /* treat as named arg */ RPCArg::Optional::OMITTED_NAMED_ARG, "A list of strings",