Author

Topic: Bug? - getaddr command contains checksum despite having no payload (Read 1956 times)

hero member
Activity: 489
Merit: 505
Activity: -
Merit: -
Well to be precise there are quite a few messages without payload that have checksums (see ping for example) I don't think this should be labeled as a bug, it's simpler not to have a special case for empty payload messages when stripping the message header :-)

So do all messages (except 'version' and 'verack') contain checksums regardless of whether or not they have a payload?
hero member
Activity: 489
Merit: 505
Well to be precise there are quite a few messages without payload that have checksums (see ping for example) I don't think this should be labeled as a bug, it's simpler not to have a special case for empty payload messages when stripping the message header :-)
Activity: -
Merit: -
I had the same problem, but yes the checksum for an empty message (byte[0]) is 0x5DF6E0E2 so that's correct Cheesy Useless but correct.

Yeah, I was able to work around it without a problem.  I asked about this in IRC a day or two ago, but no one had anything useful to say about it, so I figured I'd bring it up in the forum, so if it is a bug (seems to be no reason for it to be there), that it could get fixed.  Otherwise it might cause some problems for other people working on their own Bitcoin implementations.  I made a note about it in the wiki:

https://en.bitcoin.it/wiki/Protocol_specification#getaddr
hero member
Activity: 489
Merit: 505
I had the same problem, but yes the checksum for an empty message (byte[0]) is 0x5DF6E0E2 so that's correct Cheesy Useless but correct.
Activity: -
Merit: -
This is part of a packet from the current 0.3.19 linux client:

Code:
0000   F9 BE B4 D9 67 65 74 61  64 64 72 00 00 00 00 00   ....getaddr.....
0010   00 00 00 00 5D F6 E0 E2                            ....]...

It is my understanding that if there is no payload, there should be no checksum.  Is my understanding correct and this is a bug?
Jump to: