Skip to content

Commit 0ef7de9

Browse files
committed
[RPCs] Remove submitblock parameters argument help text
1 parent 228c319 commit 0ef7de9

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/rpc/mining.cpp

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -722,19 +722,16 @@ class submitblock_StateCatcher : public CValidationInterface
722722

723723
UniValue submitblock(const JSONRPCRequest& request)
724724
{
725+
// We allow 2 arguments for compliance with BIP22. Argument 2 is ignored.
725726
if (request.fHelp || request.params.size() < 1 || request.params.size() > 2) {
726727
throw std::runtime_error(
727-
"submitblock \"hexdata\" ( \"jsonparametersobject\" )\n"
728+
"submitblock \"hexdata\" ( \"dummy\" )\n"
728729
"\nAttempts to submit new block to network.\n"
729-
"The 'jsonparametersobject' parameter is currently ignored.\n"
730730
"See https://en.bitcoin.it/wiki/BIP_0022 for full specification.\n"
731731

732732
"\nArguments\n"
733733
"1. \"hexdata\" (string, required) the hex-encoded block data to submit\n"
734-
"2. \"parameters\" (string, optional) object of optional parameters\n"
735-
" {\n"
736-
" \"workid\" : \"id\" (string, optional) if the server provided a workid, it MUST be included with submissions\n"
737-
" }\n"
734+
"2. \"dummy\" (optional) dummy value, for compatibility with BIP22. This value is ignored.\n"
738735
"\nResult:\n"
739736
"\nExamples:\n"
740737
+ HelpExampleCli("submitblock", "\"mydata\"")
@@ -963,7 +960,7 @@ static const CRPCCommand commands[] =
963960
{ "mining", "getmininginfo", &getmininginfo, true, {} },
964961
{ "mining", "prioritisetransaction", &prioritisetransaction, true, {"txid","dummy","fee_delta"} },
965962
{ "mining", "getblocktemplate", &getblocktemplate, true, {"template_request"} },
966-
{ "mining", "submitblock", &submitblock, true, {"hexdata","parameters"} },
963+
{ "mining", "submitblock", &submitblock, true, {"hexdata","dummy"} },
967964

968965
{ "generating", "generate", &generate, true, {"nblocks","maxtries"} },
969966
{ "generating", "generatetoaddress", &generatetoaddress, true, {"nblocks","address","maxtries"} },

0 commit comments

Comments
 (0)