merge bitcoin#23702: Add missing optional to getblockfrompeer

This commit is contained in:
Kittywhiskers Van Gogh 2021-12-08 11:42:11 +01:00
parent c294457b52
commit 7e5cc5e375
No known key found for this signature in database
GPG Key ID: 30CD0C065E5C4AAD

View File

@ -769,7 +769,8 @@ static RPCHelpMan getmempoolentry()
static RPCHelpMan getblockfrompeer()
{
return RPCHelpMan{"getblockfrompeer",
return RPCHelpMan{
"getblockfrompeer",
"\nAttempt to fetch block from a given peer.\n"
"\nWe must have the header for this block, e.g. using submitheader.\n"
"\nReturns {} if a block-request was successfully scheduled\n",
@ -779,7 +780,7 @@ static RPCHelpMan getblockfrompeer()
},
RPCResult{RPCResult::Type::OBJ, "", "",
{
{RPCResult::Type::STR, "warnings", "any warnings"}
{RPCResult::Type::STR, "warnings", /*optional=*/true, "any warnings"},
}},
RPCExamples{
HelpExampleCli("getblockfrompeer", "\"00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09\" 0")