diff options
author | Andrew Chow <github@achow101.com> | 2023-10-04 16:50:39 -0400 |
---|---|---|
committer | Andrew Chow <github@achow101.com> | 2023-10-04 16:57:32 -0400 |
commit | 5b4478418b24422885ae4d5c9a41a45455a72618 (patch) | |
tree | 18a86830508562c17bb2c277c5fefc6ff266455a /src/validation.cpp | |
parent | 8369467c94bfddb1c93aa691a3392502fb19b033 (diff) | |
parent | ba2e5bfc67dcffca26af9e231652ada1767cbeb2 (diff) |
Merge bitcoin/bitcoin#28577: net: raise V1_PREFIX_LEN from 12 to 16
ba2e5bfc67dcffca26af9e231652ada1767cbeb2 net: raise V1_PREFIX_LEN from 12 to 16 (Pieter Wuille)
Pull request description:
A "version" message in the V1 protocol starts with a fixed 16 bytes:
* The 4-byte network magic
* The 12-byte command string: "version" plus 5 0x00 bytes
The current code detects incoming V1 connections by just looking at the first 12 bytes (matching an [earlier version](https://github.com/bitcoin/bips/pull/1496) of BIP324), but 16 bytes is more precise. This isn't an observable difference right now, as a 12 byte prefix ought to be negligible already, but it may become observable with future extensions to the protocol, so make the code match the specification.
ACKs for top commit:
achow101:
ACK ba2e5bfc67dcffca26af9e231652ada1767cbeb2
theStack:
re-ACK ba2e5bfc67dcffca26af9e231652ada1767cbeb2
mzumsande:
Code review ACK ba2e5bfc67dcffca26af9e231652ada1767cbeb2
Tree-SHA512: 64876b03613bd1c5dda82f4ca1b367014365f9ae4cfa30f45c5758a563c68cbea81a98d02ba616c264674c204517aac8b7de94da10f32e77b56267a43710c651
Diffstat (limited to 'src/validation.cpp')
0 files changed, 0 insertions, 0 deletions