althea-net / serde-rlp

Ethereum's RLP encoding implemented as a Serde data format
Apache License 2.0
13 stars 10 forks source link

Serialization of u8/u16/u32/u64 #10

Open mpapierski opened 6 years ago

mpapierski commented 6 years ago

Serializing 0u8 should yield the same result as serializing 0u16, 0u32, 0u64.

Right now serializing "0u64" yields [136, 0, 0, 0, 0, 0, 0, 0, 0] which is invalid - with primitive types and with big endian encoding it doesn't make difference if we'll serialize it as 8 zeros, or one zero.