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