kopanitsa / web3-arduino

an Arduino (or ESP32) library to use web3 on Ethereum platform.
MIT License
105 stars 45 forks source link

RLP Encode Header - Off by one error #9

Open TbLtzk opened 5 years ago

TbLtzk commented 5 years ago

The RLP specification has one path for encoding 0-55 bytes and another path for encoding longer byte arrays.

This should be programmed as if length < 56 or if length <= 55. There are two places with length < 55

TbLtzk commented 5 years ago

personally I prefer <56 but to stay consistent with other places I'd go for <=55