Bitcoin

p2p – Is there a hash_count field in getheaders/getblocks messages?

This is a question of terminology, but these descriptions are all equivalent.

A locator is a hash vector. In Bitcoin’s serialization framework, vectors are always serialized by first recording the number of objects and then concatenating the serialization of those objects themselves.

Some descriptions of the protocol treat this count as a separate “field” before the object, while others treat it as part of the object itself. For anyone familiar with the source code, the latter will feel more familiar because there is no actual variable “hash_count” in the implementation. It’s just the length of the locator object that comes out.

Related Articles

Back to top button