@@ -722,19 +722,16 @@ class submitblock_StateCatcher : public CValidationInterface
722
722
723
723
UniValue submitblock (const JSONRPCRequest& request)
724
724
{
725
+ // We allow 2 arguments for compliance with BIP22. Argument 2 is ignored.
725
726
if (request.fHelp || request.params .size () < 1 || request.params .size () > 2 ) {
726
727
throw std::runtime_error (
727
- " submitblock \" hexdata\" ( \" jsonparametersobject \" )\n "
728
+ " submitblock \" hexdata\" ( \" dummy \" )\n "
728
729
" \n Attempts to submit new block to network.\n "
729
- " The 'jsonparametersobject' parameter is currently ignored.\n "
730
730
" See https://en.bitcoin.it/wiki/BIP_0022 for full specification.\n "
731
731
732
732
" \n Arguments\n "
733
733
" 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 "
738
735
" \n Result:\n "
739
736
" \n Examples:\n "
740
737
+ HelpExampleCli (" submitblock" , " \" mydata\" " )
@@ -963,7 +960,7 @@ static const CRPCCommand commands[] =
963
960
{ " mining" , " getmininginfo" , &getmininginfo, true , {} },
964
961
{ " mining" , " prioritisetransaction" , &prioritisetransaction, true , {" txid" ," dummy" ," fee_delta" } },
965
962
{ " mining" , " getblocktemplate" , &getblocktemplate, true , {" template_request" } },
966
- { " mining" , " submitblock" , &submitblock, true , {" hexdata" ," parameters " } },
963
+ { " mining" , " submitblock" , &submitblock, true , {" hexdata" ," dummy " } },
967
964
968
965
{ " generating" , " generate" , &generate, true , {" nblocks" ," maxtries" } },
969
966
{ " generating" , " generatetoaddress" , &generatetoaddress, true , {" nblocks" ," address" ," maxtries" } },
0 commit comments