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