According to the Protocol Specification, 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?

2 Answers 2


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.

  • The author was correct when he wrote this, although it is now possible to get partial headers (using Bloom filters)
    – Streblo
    Commented May 11, 2013 at 22:50

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

  • 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
    Commented Dec 1, 2011 at 10:12
  • 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
    Commented Dec 1, 2011 at 10:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.