Changeset View
Changeset View
Standalone View
Standalone View
src/rpc/mining.cpp
Show First 20 Lines • Show All 1,028 Lines • ▼ Show 20 Lines | RPCHelpMan{ | ||||
"See https://en.bitcoin.it/wiki/BIP_0022 for full specification.\n", | "See https://en.bitcoin.it/wiki/BIP_0022 for full specification.\n", | ||||
{ | { | ||||
{"hexdata", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, | {"hexdata", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, | ||||
"the hex-encoded block data to submit"}, | "the hex-encoded block data to submit"}, | ||||
{"dummy", RPCArg::Type::STR, /* default */ "ignored", | {"dummy", RPCArg::Type::STR, /* default */ "ignored", | ||||
"dummy value, for compatibility with BIP22. This value is " | "dummy value, for compatibility with BIP22. This value is " | ||||
"ignored."}, | "ignored."}, | ||||
}, | }, | ||||
RPCResults{}, | RPCResult{RPCResult::Type::NONE, "", | ||||
"Returns JSON Null when valid, a string according to BIP22 " | |||||
"otherwise"}, | |||||
RPCExamples{HelpExampleCli("submitblock", "\"mydata\"") + | RPCExamples{HelpExampleCli("submitblock", "\"mydata\"") + | ||||
HelpExampleRpc("submitblock", "\"mydata\"")}, | HelpExampleRpc("submitblock", "\"mydata\"")}, | ||||
} | } | ||||
.Check(request); | .Check(request); | ||||
std::shared_ptr<CBlock> blockptr = std::make_shared<CBlock>(); | std::shared_ptr<CBlock> blockptr = std::make_shared<CBlock>(); | ||||
CBlock &block = *blockptr; | CBlock &block = *blockptr; | ||||
if (!DecodeHexBlk(block, request.params[0].get_str())) { | if (!DecodeHexBlk(block, request.params[0].get_str())) { | ||||
▲ Show 20 Lines • Show All 128 Lines • Show Last 20 Lines |