mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 03:52:49 +01:00
merge bitcoin#23702: Add missing optional to getblockfrompeer
This commit is contained in:
parent
c294457b52
commit
7e5cc5e375
@ -769,22 +769,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…
Reference in New Issue
Block a user