submitblock2
Submits the given block together with an explicit list of transactions that the block references but that may not yet be present in this node's transaction pool, then adds it to the local blockchain and broadcasts it to the network.
Request
{
"jsonrpc": "2.0",
"id": 0,
"method": "submitblock2",
"params": {
"b": "0300000000000000...082c9bcdac5235a4e99e3862875a3e27137e623bd63f94ba66f7841ba22baa6e300c4a5d9a306000201",
"explicit_txs": [
"0100010200028094ebdc0302a0c1e7b1f0d0e2c8b3a49103f4a2d7e0c9b6a3f1d8e5c2b9a6f3e0d7c4b1a8f5e2d9c6b3a0f7"
]
}
}
Request parameters
- b - string; hex-encoded blob of the block being submitted.
- explicit_txs - array of strings; hex-encoded blobs of the transactions that must be onboarded together with the block. Each blob is parsed and validated, and the resulting transactions are handed to the core along with the block, so the block can be accepted even if those transactions never reached this node's pool. Pass an empty array if the block references no such transactions.
Unlike submitblock, which takes an array holding a single block blob and requires every referenced transaction to already be known to the node, submitblock2 takes the block as a named field and lets the caller supply the missing transactions inline.
If the block blob or any of the explicit transaction blobs cannot be parsed, the call fails with a JSON-RPC error. The call also fails if the block is not accepted by the core, with a distinct error reported when the block was added to an alternative chain instead of the main chain.
Response
{
"id": 0,
"jsonrpc": "2.0",
"result": {
"status": "OK"
}
}
Response information
- status - "OK" on success; "BUSY" if the daemon is still synchronizing with the network (see Daemon RPC API).