@@ -769,22 +769,23 @@ static RPCHelpMan getmempoolentry()
769
769
770
770
static RPCHelpMan getblockfrompeer ()
771
771
{
772
- return RPCHelpMan{" getblockfrompeer" ,
773
- " \n Attempt to fetch block from a given peer.\n "
774
- " \n We must have the header for this block, e.g. using submitheader.\n "
775
- " \n Returns {} if a block-request was successfully scheduled\n " ,
776
- {
777
- {" blockhash" , RPCArg::Type::STR_HEX, RPCArg::Optional::NO, " The block hash" },
778
- {" nodeid" , RPCArg::Type::NUM, RPCArg::Optional::NO, " The node ID (see getpeerinfo for node IDs)" },
779
- },
780
- RPCResult{RPCResult::Type::OBJ, " " , " " ,
781
- {
782
- {RPCResult::Type::STR, " warnings" , " any warnings" }
783
- }},
784
- RPCExamples{
785
- HelpExampleCli (" getblockfrompeer" , " \" 00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09\" 0" )
786
- + HelpExampleRpc (" getblockfrompeer" , " \" 00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09\" 0" )
787
- },
772
+ return RPCHelpMan{
773
+ " getblockfrompeer" ,
774
+ " \n Attempt to fetch block from a given peer.\n "
775
+ " \n We must have the header for this block, e.g. using submitheader.\n "
776
+ " \n Returns {} if a block-request was successfully scheduled\n " ,
777
+ {
778
+ {" blockhash" , RPCArg::Type::STR_HEX, RPCArg::Optional::NO, " The block hash" },
779
+ {" nodeid" , RPCArg::Type::NUM, RPCArg::Optional::NO, " The node ID (see getpeerinfo for node IDs)" },
780
+ },
781
+ RPCResult{RPCResult::Type::OBJ, " " , " " ,
782
+ {
783
+ {RPCResult::Type::STR, " warnings" , /* optional=*/ true , " any warnings" },
784
+ }},
785
+ RPCExamples{
786
+ HelpExampleCli (" getblockfrompeer" , " \" 00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09\" 0" )
787
+ + HelpExampleRpc (" getblockfrompeer" , " \" 00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09\" 0" )
788
+ },
788
789
[&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
789
790
{
790
791
const NodeContext& node = EnsureAnyNodeContext (request.context );
0 commit comments