mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-06-30 02:31:05 +02:00
rpc: Properly document getblocktemplate return value
Can be reviewed with --ignore-all-space
This commit is contained in:
@ -519,19 +519,19 @@ static RPCHelpMan getblocktemplate()
|
||||
{"capabilities", RPCArg::Type::ARR, /* treat as named arg */ RPCArg::Optional::OMITTED_NAMED_ARG, "A list of strings",
|
||||
{
|
||||
{"str", RPCArg::Type::STR, RPCArg::Optional::OMITTED, "client side supported feature, 'longpoll', 'coinbasevalue', 'proposal', 'serverlist', 'workid'"},
|
||||
},
|
||||
},
|
||||
}},
|
||||
{"rules", RPCArg::Type::ARR, RPCArg::Optional::NO, "A list of strings",
|
||||
{
|
||||
{"segwit", RPCArg::Type::STR, RPCArg::Optional::NO, "(literal) indicates client side segwit support"},
|
||||
{"str", RPCArg::Type::STR, RPCArg::Optional::OMITTED, "other client side supported softfork deployment"},
|
||||
},
|
||||
},
|
||||
}},
|
||||
},
|
||||
"\"template_request\""},
|
||||
},
|
||||
RPCResult{
|
||||
RPCResult::Type::OBJ, "", "",
|
||||
{
|
||||
RPCResult{"If the proposal was accepted with mode=='proposal'", RPCResult::Type::NONE, "", ""},
|
||||
RPCResult{"If the proposal was not accepted with mode=='proposal'", RPCResult::Type::STR, "", "According to BIP22"},
|
||||
RPCResult{"Otherwise", RPCResult::Type::OBJ, "", "",
|
||||
{
|
||||
{RPCResult::Type::NUM, "version", "The preferred block version"},
|
||||
{RPCResult::Type::ARR, "rules", "specific block rules that are to be enforced",
|
||||
@ -579,8 +579,9 @@ static RPCHelpMan getblocktemplate()
|
||||
{RPCResult::Type::NUM_TIME, "curtime", "current timestamp in " + UNIX_EPOCH_TIME},
|
||||
{RPCResult::Type::STR, "bits", "compressed target of next block"},
|
||||
{RPCResult::Type::NUM, "height", "The height of the next block"},
|
||||
{RPCResult::Type::STR, "default_witness_commitment", /* optional */ true, "a valid witness commitment for the unmodified block template"}
|
||||
{RPCResult::Type::STR, "default_witness_commitment", /* optional */ true, "a valid witness commitment for the unmodified block template"},
|
||||
}},
|
||||
},
|
||||
RPCExamples{
|
||||
HelpExampleCli("getblocktemplate", "'{\"rules\": [\"segwit\"]}'")
|
||||
+ HelpExampleRpc("getblocktemplate", "{\"rules\": [\"segwit\"]}")
|
||||
|
Reference in New Issue
Block a user