bosnet / sebak

SEBAK, the next BOScoin Blockchain
https://devteam.blockchainos.org
GNU General Public License v3.0
44 stars 15 forks source link

Remove EncodeList, use anon struct instead #903

Closed Geod24 closed 5 years ago

Geod24 commented 5 years ago
By shifting the type to the call site, we can greatly simplify the code
without loosing in readability.
Geod24 commented 5 years ago

totalLength is necessary?

In which regard ? I left the variable because it makes it slightly more obvious what it is for. Can remove it if you want.

Geod24 commented 5 years ago

To make it simpler, how about providing EncodeRLP/DecodeRLP pair to Header and Body of the Operation?

I thought about this, but I am wondering if it would not imply too much copying. I will look into it for further improvement, thanks for the idea!