Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not subtract MESSAGE_HEADER_LEN from version payload length #310

Closed
wants to merge 1 commit into from

Conversation

achow101
Copy link

The payload length does not include the MESSAGE_HEADER_LEN which means that our calculation for the remaining size of the version payload is too small. When the payload length is exactly 104 bytes (as it is with Bitcoin Core 0.15.0.1 due to the slightly longer user agent), this will cause get_varint to fail. This was not experienced before because the version message was 2 bytes shorter at 102 bytes so the size remaining was greater than 0.

This should fix the bug identified by @jameshilliard on IRC.

@goatpig
Copy link
Owner

goatpig commented Sep 26, 2017

Cherry picked into master

@goatpig goatpig closed this Sep 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants