Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: TierNolan on July 30, 2013, 09:03:22 PM



Title: Version field in the getheaders message
Post by: TierNolan on July 30, 2013, 09:03:22 PM
What is the purpose of this field?  Was it intended to only get headers of a particular version?


Title: Re: Version field in the getheaders message
Post by: jgarzik on July 31, 2013, 10:49:59 AM
What is the purpose of this field?  Was it intended to only get headers of a particular version?

Where do you see a version field in the "getheaders" message?

"getheaders" has two parameters, locator and hashStop.

Of course, each block header has the block header version.



Title: Re: Version field in the getheaders message
Post by: TierNolan on July 31, 2013, 10:58:12 AM
Where do you see a version field in the "getheaders" message?

"getheaders" has two parameters, locator and hashStop.

It says there is a version field in the protocol spec (https://en.bitcoin.it/wiki/Protocol_specification#getheaders).

However, I should have read it more closely, version means the protocol version, so nevermind.


Title: Re: Version field in the getheaders message
Post by: jgarzik on July 31, 2013, 06:43:50 PM
Where do you see a version field in the "getheaders" message?

"getheaders" has two parameters, locator and hashStop.

It says there is a version field in the protocol spec (https://en.bitcoin.it/wiki/Protocol_specification#getheaders).

However, I should have read it more closely, version means the protocol version, so nevermind.

No, it is the version of the block-locator object.

The wiki is unclear.  "getheaders" receives two parameters, a block-locator object and a hashStop.  Inside the block-locator object, there is a version for that locator data structure only.  The version applies to the locator object, not getheaders message as a whole or hashStop parameter.