MessageHeader uses incorrect extensions size?
paulmelis opened this issue · 1 comments
paulmelis commented
I was working on parsing the UDP packets being sent on the Nano network (not related to your implementation). I seem to get some malformed package headers, with respect to the extensions field, although it's hard to tell without a clear specification.
Reading the Nano code, specifically https://github.com/nanocurrency/raiblocks/blob/8caed829b461b015141d2dcd57d9b3457ba0f7f0/rai/node/common.cpp#L53, it seems the extensions field uses 2 bytes. But in your code,
Line 55 in 078a99b
paulmelis commented
Ah, I now see what's going: the block type is stuffed in 8 bits of the extensions value (https://github.com/nanocurrency/raiblocks/blob/8caed829b461b015141d2dcd57d9b3457ba0f7f0/rai/node/common.cpp#L33)