mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-19 13:27:35 +02:00
Merge bitcoin/bitcoin#23702: doc: Add missing optional to getblockfrompeer
aaaa34e34ddoc: Add missing optional to getblockfrompeer (MarcoFalke) Pull request description: Can be reviewed with `--word-diff-regex=. --ignore-all-space` ACKs for top commit: Sjors: utACKaaaa34e34dTree-SHA512: 7f46c82a46b8cc19f7eb549b9aa13be8cd6849a8ef8a2ddda6d1eee6978d099fccadd29a2bf817f44d601b905f5d5f6b5d8f4f54be5ee8b914b520359c058e68
This commit is contained in:
commit
577bd51a4b
1 changed files with 17 additions and 16 deletions
|
|
@ -777,22 +777,23 @@ static RPCHelpMan getmempoolentry()
|
||||||
|
|
||||||
static RPCHelpMan getblockfrompeer()
|
static RPCHelpMan getblockfrompeer()
|
||||||
{
|
{
|
||||||
return RPCHelpMan{"getblockfrompeer",
|
return RPCHelpMan{
|
||||||
"\nAttempt to fetch block from a given peer.\n"
|
"getblockfrompeer",
|
||||||
"\nWe must have the header for this block, e.g. using submitheader.\n"
|
"\nAttempt to fetch block from a given peer.\n"
|
||||||
"\nReturns {} if a block-request was successfully scheduled\n",
|
"\nWe must have the header for this block, e.g. using submitheader.\n"
|
||||||
{
|
"\nReturns {} if a block-request was successfully scheduled\n",
|
||||||
{"blockhash", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "The block hash"},
|
{
|
||||||
{"nodeid", RPCArg::Type::NUM, RPCArg::Optional::NO, "The node ID (see getpeerinfo for node IDs)"},
|
{"blockhash", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "The block hash"},
|
||||||
},
|
{"nodeid", RPCArg::Type::NUM, RPCArg::Optional::NO, "The node ID (see getpeerinfo for node IDs)"},
|
||||||
RPCResult{RPCResult::Type::OBJ, "", "",
|
},
|
||||||
{
|
RPCResult{RPCResult::Type::OBJ, "", "",
|
||||||
{RPCResult::Type::STR, "warnings", "any warnings"}
|
{
|
||||||
}},
|
{RPCResult::Type::STR, "warnings", /*optional=*/true, "any warnings"},
|
||||||
RPCExamples{
|
}},
|
||||||
HelpExampleCli("getblockfrompeer", "\"00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09\" 0")
|
RPCExamples{
|
||||||
+ HelpExampleRpc("getblockfrompeer", "\"00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09\" 0")
|
HelpExampleCli("getblockfrompeer", "\"00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09\" 0")
|
||||||
},
|
+ HelpExampleRpc("getblockfrompeer", "\"00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09\" 0")
|
||||||
|
},
|
||||||
[&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
|
[&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
|
||||||
{
|
{
|
||||||
const NodeContext& node = EnsureAnyNodeContext(request.context);
|
const NodeContext& node = EnsureAnyNodeContext(request.context);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue