[Bitcoin-development] Missing fRelayTxes in version message
Jeff Garzik
jgarzik at bitpay.com
Thu Jun 20 13:35:11 UTC 2013
On Thu, Jun 20, 2013 at 3:13 AM, Addy Yeow <ayeowch at gmail.com> wrote:
> I personally don't treat the relay field as optional, i.e. it is there as
> 0x01 if it is set. Otherwise, it is simply a trailing zero byte. Hence, the
> right way of reading the packet as with any network packet is to first
> retrieve the header information, get the actual payload length, then parse
> the payload accordingly. I can also choose to include 0x00 for my relay
> field in my outgoing packet and reflect that accordingly in my length field
> in the header.
That works until another field is added in the same manner.
Implementations are expected to follow the standard logic of
if (more data)
parse field X
if (more data)
parse field X+1
if (more data)
parse field X+2
etc.
Ugly or not, there is no point in changing now. Updating the version
message to a radically different design, for simply cleanliness
reasons, is not sufficient cause to migrate the entire bitcoin
universe to a new and different version/feature negotiation setup.
--
Jeff Garzik
Senior Software Engineer and open source evangelist
BitPay, Inc. https://bitpay.com/
More information about the bitcoin-dev
mailing list