7 Commits (ecea90fd7937aa1b145f304e28a3870790b161ff)

Author SHA1 Message Date
Martin Hebnes Pedersen 29c24593f9 Support Rate 1/2 Data CRC Mask
The previous implementation hardcoded the mask for Rate 3/4 Data (0x01ff),
causing CRC check failure for Rate 1/2 on both encode and decode.

This patch also refactors to avoid code copying and fixes a bug where
calling DataBlock.Byte() on the output of Fragment.DataBlocks() produced
an incorrect CRC value due to Bytes() not resetting db.CRC before
performing it's own CRC calculation.
6 years ago
Martin Hebnes Pedersen 2851102398 Fix serialization of Confirmed DataBlock
The serialized form should be 10 octets of user-data plus the two octets
for serial/crc.

Previous implementation forgot to account for the two extra octets when
allocating the final data slice.
6 years ago
Martin Hebnes Pedersen f4fff47365 Fix panic in Fragment.DataBlocks() duo to typo
store vs stored
6 years ago
Martin Hebnes Pedersen d206b8c2bd Fix ParseDataBlock of unconfirmed data
The Data slice was not initialized before calling copy(dst, src)
6 years ago
Wijnand Modderman-Lenstra 3fe41e10ef Checkpoint 9 years ago
Wijnand Modderman-Lenstra 4f2b16dfcb Checkpoint 9 years ago
Wijnand Modderman-Lenstra cca6817956 Checkpoint 9 years ago