<p>Because no transactions are included in the message. I don't think there is any intended future use.</p>

CC BY-SA 3.0
2011-12-01T10:12:40.853Z
You mean transactions (Txs)? One could technically state how many of them there are in the original block, but then it would be a varint and the header would be of variable byte length.
ThePiachu
CC BY-SA 3.0
2011-12-01T10:57:41.190Z
Yeah, that's what I meant. I edited it. The protocol specification seems to be in error when it says that blocks normally have varint tx counts (or that headers don't). Headers are standard CBlock objects with the tx vector left empty, so the types are the same.
theymos
CC BY-SA 3.0
2011-12-01T04:39:55.667Z
2011-12-01T10:41:51.947Z
2011-12-01T10:41:51.947Z
theymos
<p>The headers message is sent in response to a getheaders message.</p>

<p>The txn_count is always 0 simply to make the parsing of this packet compatible with the parsing of the block message.</p>

<p>getheaders is designed to be used by a simplified client, however since there is no way to get partial merkle branches using the standard protocol this cannot actually be done.</p>

CC BY-SA 3.0
2013-05-11T22:50:13.920Z
The author was correct when he wrote this, although it is now possible to get partial headers (using Bloom filters)
Streblo
CC BY-SA 3.0
2011-12-02T00:16:52.923Z
2011-12-02T00:16:52.923Z
patrick
<p>According to the <a href="https://en.bitcoin.it/wiki/Protocol_specification#Block_Headers" rel="noreferrer">Protocol Specification</a>, the txn_count field of a Block Header is always set to 0, why is that? What are the intended future uses of this field?</p>

<protocol><block><block-header><raw>
Why is the Block Header txn_count field always zero?
ThePiachu
# Why is the Block Header txn_count field always zero?

(Asked by: username_0 on 2011-12-01)

According to the [Protocol Specification](https://en.bitcoin.it/wiki/Protocol_specification#Block_Headers), the txn\_count field of a Block Header is always set to 0, why is that? What are the intended future uses of this field?

**Tags:** protocol, block, block-header, raw


---

## 2 answers

### Answer by username_2 on 2011-12-02. Score: 3 | Accepted answer

The headers message is sent in response to a getheaders message.

The txn\_count is always 0 simply to make the parsing of this packet compatible with the parsing of the block message.

getheaders is designed to be used by a simplified client, however since there is no way to get partial merkle branches using the standard protocol this cannot actually be done.

> **Comments:**
> **username_3**: The author was correct when he wrote this, although it is now possible to get partial headers (using Bloom filters)  

---

### Answer by username_1 on 2011-12-01. Score: 2

Because no transactions are included in the message. I don't think there is any intended future use.

> **Comments:**
> **username_0**: You mean transactions (Txs)? One could technically state how many of them there are in the original block, but then it would be a varint and the header would be of variable byte length.  
> **username_1**: Yeah, that's what I meant. I edited it. The protocol specification seems to be in error when it says that blocks normally have varint tx counts (or that headers don't). Headers are standard CBlock objects with the tx vector left empty, so the types are the same.  

---

