submitblock
mining dangerous since 0.7.0attempts to submit new block to network.
↑ shares the docs page. Use Share this query below for a link with your current arg values.
Not executable from the web. Would harm the node, the network, or expose secrets. Documentation only, never executable from the web.
Call from your own code
Replace $BITCOIN_RPC_USER / $BITCOIN_RPC_PASSWORD with credentials from your bitcoind's bitcoin.conf,
and replace localhost:8332 with your node's RPC address.
You can't run this RPC against our node, but you can run it against your own bitcoind.
Help
submitblock "hexdata" ( "dummy" )
Attempts to submit new block to network.
See https://en.bitcoin.it/wiki/BIP_0022 for full specification.
Arguments:
1. hexdata (string, required) the hex-encoded block data to submit
2. dummy (string, optional, default=ignored) dummy value, for compatibility with BIP22. This value is ignored.
Result (If the block was accepted):
null (json null)
Result (Otherwise):
"str" (string) According to BIP22
Examples:
> bitcoin-cli submitblock "mydata"
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "submitblock", "params": ["mydata"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/