|
|
|
@ -722,19 +722,16 @@ protected:
@@ -722,19 +722,16 @@ protected:
|
|
|
|
|
|
|
|
|
|
UniValue submitblock(const JSONRPCRequest& request) |
|
|
|
|
{ |
|
|
|
|
// We allow 2 arguments for compliance with BIP22. Argument 2 is ignored.
|
|
|
|
|
if (request.fHelp || request.params.size() < 1 || request.params.size() > 2) { |
|
|
|
|
throw std::runtime_error( |
|
|
|
|
"submitblock \"hexdata\" ( \"jsonparametersobject\" )\n" |
|
|
|
|
"submitblock \"hexdata\" ( \"dummy\" )\n" |
|
|
|
|
"\nAttempts to submit new block to network.\n" |
|
|
|
|
"The 'jsonparametersobject' parameter is currently ignored.\n" |
|
|
|
|
"See https://en.bitcoin.it/wiki/BIP_0022 for full specification.\n" |
|
|
|
|
|
|
|
|
|
"\nArguments\n" |
|
|
|
|
"1. \"hexdata\" (string, required) the hex-encoded block data to submit\n" |
|
|
|
|
"2. \"parameters\" (string, optional) object of optional parameters\n" |
|
|
|
|
" {\n" |
|
|
|
|
" \"workid\" : \"id\" (string, optional) if the server provided a workid, it MUST be included with submissions\n" |
|
|
|
|
" }\n" |
|
|
|
|
"2. \"dummy\" (optional) dummy value, for compatibility with BIP22. This value is ignored.\n" |
|
|
|
|
"\nResult:\n" |
|
|
|
|
"\nExamples:\n" |
|
|
|
|
+ HelpExampleCli("submitblock", "\"mydata\"") |
|
|
|
@ -963,7 +960,7 @@ static const CRPCCommand commands[] =
@@ -963,7 +960,7 @@ static const CRPCCommand commands[] =
|
|
|
|
|
{ "mining", "getmininginfo", &getmininginfo, true, {} }, |
|
|
|
|
{ "mining", "prioritisetransaction", &prioritisetransaction, true, {"txid","dummy","fee_delta"} }, |
|
|
|
|
{ "mining", "getblocktemplate", &getblocktemplate, true, {"template_request"} }, |
|
|
|
|
{ "mining", "submitblock", &submitblock, true, {"hexdata","parameters"} }, |
|
|
|
|
{ "mining", "submitblock", &submitblock, true, {"hexdata","dummy"} }, |
|
|
|
|
|
|
|
|
|
{ "generating", "generate", &generate, true, {"nblocks","maxtries"} }, |
|
|
|
|
{ "generating", "generatetoaddress", &generatetoaddress, true, {"nblocks","address","maxtries"} }, |
|
|
|
|