Merge #8951: RPC/Mining: getblocktemplate: Update and fix formatting of help

59daa58 RPC/Mining: getblocktemplate: Update and fix formatting of help (Luke Dashjr)
This commit is contained in:
Wladimir J. van der Laan 2016-10-19 10:49:52 +02:00 committed by Alexander Block
parent c2e007538c
commit b5b7cd7b7b

View File

@ -321,20 +321,25 @@ UniValue getblocktemplate(const UniValue& params, bool fHelp)
{ {
if (fHelp || params.size() > 1) if (fHelp || params.size() > 1)
throw runtime_error( throw runtime_error(
"getblocktemplate ( \"jsonrequestobject\" )\n" "getblocktemplate ( TemplateRequest )\n"
"\nIf the request parameters include a 'mode' key, that is used to explicitly select between the default 'template' request or a 'proposal'.\n" "\nIf the request parameters include a 'mode' key, that is used to explicitly select between the default 'template' request or a 'proposal'.\n"
"It returns data needed to construct a block to work on.\n" "It returns data needed to construct a block to work on.\n"
"For full specification, see BIPs 22 and 9:\n" "For full specification, see BIPs 22, 23, and 9:\n"
" https://github.com/bitcoin/bips/blob/master/bip-0022.mediawiki\n" " https://github.com/bitcoin/bips/blob/master/bip-0022.mediawiki\n"
" https://github.com/bitcoin/bips/blob/master/bip-0023.mediawiki\n"
" 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"
"\nArguments:\n" "\nArguments:\n"
"1. \"jsonrequestobject\" (string, optional) A json object in the following spec\n" "1. TemplateRequest (json object, optional) A json object in the following spec\n"
" {\n" " {\n"
" \"mode\":\"template\" (string, optional) This must be set to \"template\" or omitted\n" " \"mode\":\"template\" (string, optional) This must be set to \"template\", \"proposal\" (see BIP 23), or omitted\n"
" \"capabilities\":[ (array, optional) A list of strings\n" " \"capabilities\":[ (array, optional) A list of strings\n"
" \"support\" (string) client side supported feature, 'longpoll', 'coinbasetxn', 'coinbasevalue', 'proposal', 'serverlist', 'workid'\n" " \"support\" (string) client side supported feature, 'longpoll', 'coinbasetxn', 'coinbasevalue', 'proposal', 'serverlist', 'workid'\n"
" ,...\n" " ,...\n"
" ],\n"
" \"rules\":[ (array, optional) A list of strings\n"
" \"support\" (string) client side supported softfork deployment\n"
" ,...\n"
" ]\n" " ]\n"
" }\n" " }\n"
"\n" "\n"
@ -342,7 +347,7 @@ UniValue getblocktemplate(const UniValue& params, bool fHelp)
"\nResult:\n" "\nResult:\n"
"{\n" "{\n"
" \"capabilities\" : [ \"capability\", ... ], (array of strings) specific client side supported features\n" " \"capabilities\" : [ \"capability\", ... ], (array of strings) specific client side supported features\n"
" \"version\" : n, (numeric) The block version\n" " \"version\" : n, (numeric) The preferred block version\n"
" \"rules\" : [ \"rulename\", ... ], (array of strings) specific block rules that are to be enforced\n" " \"rules\" : [ \"rulename\", ... ], (array of strings) specific block rules that are to be enforced\n"
" \"vbavailable\" : { (json object) set of pending, supported versionbit (BIP 9) softfork deployments\n" " \"vbavailable\" : { (json object) set of pending, supported versionbit (BIP 9) softfork deployments\n"
" \"rulename\" : bitnumber (numeric) identifies the bit number as indicating acceptance and readiness for the named softfork rule\n" " \"rulename\" : bitnumber (numeric) identifies the bit number as indicating acceptance and readiness for the named softfork rule\n"
@ -365,7 +370,7 @@ UniValue getblocktemplate(const UniValue& params, bool fHelp)
" ,...\n" " ,...\n"
" ],\n" " ],\n"
" \"coinbaseaux\" : { (json object) data that should be included in the coinbase's scriptSig content\n" " \"coinbaseaux\" : { (json object) data that should be included in the coinbase's scriptSig content\n"
" \"flags\" : \"flags\" (string) \n" " \"flags\" : \"xx\" (string) key name is to be ignored, and value included in scriptSig\n"
" },\n" " },\n"
" \"coinbasevalue\" : n, (numeric) maximum allowable input to coinbase transaction, including the generation award and transaction fees (in duffs)\n" " \"coinbasevalue\" : n, (numeric) maximum allowable input to coinbase transaction, including the generation award and transaction fees (in duffs)\n"
" \"coinbasetxn\" : { ... }, (json object) information for coinbase transaction\n" " \"coinbasetxn\" : { ... }, (json object) information for coinbase transaction\n"
@ -375,11 +380,11 @@ UniValue getblocktemplate(const UniValue& params, bool fHelp)
" \"value\" (string) A way the block template may be changed, e.g. 'time', 'transactions', 'prevblock'\n" " \"value\" (string) A way the block template may be changed, e.g. 'time', 'transactions', 'prevblock'\n"
" ,...\n" " ,...\n"
" ],\n" " ],\n"
" \"noncerange\" : \"00000000ffffffff\", (string) A range of valid nonces\n" " \"noncerange\" : \"00000000ffffffff\",(string) A range of valid nonces\n"
" \"sigoplimit\" : n, (numeric) limit of sigops in blocks\n" " \"sigoplimit\" : n, (numeric) limit of sigops in blocks\n"
" \"sizelimit\" : n, (numeric) limit of block size\n" " \"sizelimit\" : n, (numeric) limit of block size\n"
" \"curtime\" : ttt, (numeric) current timestamp in seconds since epoch (Jan 1 1970 GMT)\n" " \"curtime\" : ttt, (numeric) current timestamp in seconds since epoch (Jan 1 1970 GMT)\n"
" \"bits\" : \"xxx\", (string) compressed target of next block\n" " \"bits\" : \"xxxxxxxx\", (string) compressed target of next block\n"
" \"height\" : n (numeric) The height of the next block\n" " \"height\" : n (numeric) The height of the next block\n"
" \"masternode\" : { (json object) required masternode payee that must be included in the next block\n" " \"masternode\" : { (json object) required masternode payee that must be included in the next block\n"
" \"payee\" : \"xxxx\", (string) payee address\n" " \"payee\" : \"xxxx\", (string) payee address\n"