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?

link|improve this question

72% accept rate
feedback

2 Answers

up vote 1 down vote accepted

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.

link|improve this answer
feedback

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

link|improve this answer
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 Dec 1 '11 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 Dec 1 '11 at 10:57
feedback

Your Answer

 
or
required, but never shown

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