status-im / nim-eth-common

Common types and helpers, used across nimbus related projects
Apache License 2.0
0 stars 1 forks source link

Fix the RLP serialization of Stint values #4

Closed zah closed 6 years ago

zah commented 6 years ago

To understand the code, you must know that the RLP spec has some peculiarities when encoding integers:

1) The zero value must be encoded as an empty list 2) Values below 128 are encoded as a single byte 3) Vaues above 128 must be encoded with the minimum number of bytes possible.

zah commented 6 years ago

Review comments addressed. A separate issue was created for adding the tests later: https://github.com/status-im/nim-eth-common/issues/5