novitski / bitcoinj

Automatically exported from code.google.com/p/bitcoinj
Apache License 2.0
0 stars 0 forks source link

VarInt limit discrepency #367

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The VarInt class use 2 values for the uint32 limit:

In sizeOf():

        else if (isLessThanUnsigned(value, 4294967296L))
            return 5;  // 1 marker + 4 data bytes

In EncodeBE():

        } else if (isLessThanUnsigned(value, 4294967295L)) {
            byte[] bytes = new byte[5];

Believe the first one is correct

Original issue reported on code.google.com by yves.cui...@gmail.com on 24 Mar 2013 at 10:23

GoogleCodeExporter commented 9 years ago
This issue was closed by revision 7b8eab19ff1d.

Original comment by hearn@google.com on 29 Mar 2013 at 4:42