Language

Choose a language

/build/rpc / btc

submitheader

submitheader "hexdata" Decode the given hexdata as a header and submit it as a candidate chain tip if valid. Throws when the header is invalid. Note: In TensorCash, full block data (including proof blob) must be provided for validation. Arguments: 1. hexdata (string, required) the hex-encoded block data (header + proof blob) Result: null (json null) None Examples: > bitcoin-cli submitheader "aabbcc" > curl --user myusername --data-binary '{"jsonrpc": "2.0", "id": "curltest", "method": "submitheader", "params": ["aabbcc"]}' -H 'content-type: application/json' http://127.0.0.1:8332/

Signature

submitheader(hexdata: string) → any

Code samples

curl --user "$RPC_USER:$RPC_PASS" \
  --data-binary '{"jsonrpc":"1.0","id":"docs","method":"submitheader","params":["\"<hexdata>\""]}' \
  -H 'content-type: text/plain;' \
  http://127.0.0.1:8332/

Parameters

NameTypeReq.Description
hexdatastringyesthe hex-encoded block data (header + proof blob)

Result

Type:  any

null (json null) None

Source: services/core-node/bcore/src/rpc/mining.cpp:1157

C++ symbol: submitheader