Files

27 lines
1.3 KiB
Markdown
Raw Permalink Normal View History

2020-02-06 12:37:37 -05:00
<div class="cwikmeta">{
"title":"HEADERS",
"related":["/protocol","/protocol/p2p/getheaders"]
}</div>
# Response: Headers ("headers")
2020-02-06 12:37:37 -05:00
Provides a contiguous set of block headers.
2020-02-06 12:37:37 -05:00
## Message Format
| Field | Length | Format | Description |
|--|--|--|--|
| block header count | variable | [variable length integer](/protocol/formats/variable-length-integer) | The number of block headers in this message. |
| block headers | variable | `block_header_count` [block headers with transaction count](#block-header-with-transaction-count-format) | The set of block headers being transmitted, with the block's transaction count. |
2020-02-06 12:37:37 -05:00
No more than 2000 block headers may be sent at one time. Block headers in this array MUST be sequential, ordered by height and without range gaps.
#### Block Header With Transaction Count Format
| Field | Length | Format | Description |
|--|--|--|--|
| block header | 80 bytes | [block header](/protocol/blockchain/block/block-header#block-header-format) | The contents of the block's header. |
2021-02-24 22:08:06 +01:00
| transaction count\* | variable | [variable length integer](/protocol/formats/variable-length-integer) | The number of transactions contained within the block with the preceding header. |
\* The transaction count above is **DEPRECATED** and should be ignored. Nodes are allowed to send 0 regardless of the actual number of transactions in the block.