Skip to content

Commit fa7ff07

Browse files
author
MarcoFalke
committed
rpc: Properly document submitblock return value
Can be reviewed with --ignore-all-space
1 parent fae542c commit fa7ff07

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

src/rpc/mining.cpp

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -941,14 +941,17 @@ static RPCHelpMan submitblock()
941941
{
942942
// We allow 2 arguments for compliance with BIP22. Argument 2 is ignored.
943943
return RPCHelpMan{"submitblock",
944-
"\nAttempts to submit new block to network.\n"
945-
"See https://en.bitcoin.it/wiki/BIP_0022 for full specification.\n",
946-
{
947-
{"hexdata", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "the hex-encoded block data to submit"},
948-
{"dummy", RPCArg::Type::STR, /* default */ "ignored", "dummy value, for compatibility with BIP22. This value is ignored."},
949-
},
950-
RPCResult{RPCResult::Type::NONE, "", "Returns JSON Null when valid, a string according to BIP22 otherwise"},
951-
RPCExamples{
944+
"\nAttempts to submit new block to network.\n"
945+
"See https://en.bitcoin.it/wiki/BIP_0022 for full specification.\n",
946+
{
947+
{"hexdata", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "the hex-encoded block data to submit"},
948+
{"dummy", RPCArg::Type::STR, /* default */ "ignored", "dummy value, for compatibility with BIP22. This value is ignored."},
949+
},
950+
{
951+
RPCResult{"If the block was accepted", RPCResult::Type::NONE, "", ""},
952+
RPCResult{"Otherwise", RPCResult::Type::STR, "", "According to BIP22"},
953+
},
954+
RPCExamples{
952955
HelpExampleCli("submitblock", "\"mydata\"")
953956
+ HelpExampleRpc("submitblock", "\"mydata\"")
954957
},

0 commit comments

Comments
 (0)