diff options
author | MarcoFalke <falke.marco@gmail.com> | 2020-11-23 12:16:31 +0100 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2021-02-25 08:21:28 +0100 |
commit | fa7ff0790ec21d187f1a32310918b0c8d66e5266 (patch) | |
tree | 4aca484e18ffd058274fdeb251e0c6bacccf32e4 /src/rpc | |
parent | fae542c28b269d4a8a39f48ef829734b1241dd4f (diff) | |
download | bitcoin-fa7ff0790ec21d187f1a32310918b0c8d66e5266.tar.xz |
rpc: Properly document submitblock return value
Can be reviewed with --ignore-all-space
Diffstat (limited to 'src/rpc')
-rw-r--r-- | src/rpc/mining.cpp | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/rpc/mining.cpp b/src/rpc/mining.cpp index 56d4898dab..54f6eeba2e 100644 --- a/src/rpc/mining.cpp +++ b/src/rpc/mining.cpp @@ -941,14 +941,17 @@ static RPCHelpMan submitblock() { // We allow 2 arguments for compliance with BIP22. Argument 2 is ignored. return RPCHelpMan{"submitblock", - "\nAttempts to submit new block to network.\n" - "See https://en.bitcoin.it/wiki/BIP_0022 for full specification.\n", - { - {"hexdata", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "the hex-encoded block data to submit"}, - {"dummy", RPCArg::Type::STR, /* default */ "ignored", "dummy value, for compatibility with BIP22. This value is ignored."}, - }, - RPCResult{RPCResult::Type::NONE, "", "Returns JSON Null when valid, a string according to BIP22 otherwise"}, - RPCExamples{ + "\nAttempts to submit new block to network.\n" + "See https://en.bitcoin.it/wiki/BIP_0022 for full specification.\n", + { + {"hexdata", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "the hex-encoded block data to submit"}, + {"dummy", RPCArg::Type::STR, /* default */ "ignored", "dummy value, for compatibility with BIP22. This value is ignored."}, + }, + { + RPCResult{"If the block was accepted", RPCResult::Type::NONE, "", ""}, + RPCResult{"Otherwise", RPCResult::Type::STR, "", "According to BIP22"}, + }, + RPCExamples{ HelpExampleCli("submitblock", "\"mydata\"") + HelpExampleRpc("submitblock", "\"mydata\"") }, |