Evgenii Stratonikov
2be18f91df
util: implement io.Serializable for Uint256
2019-11-14 14:20:38 +03:00
Vsevolod Brekelov
8ee421db14
fix spelling and godoc comments
2019-10-22 17:56:03 +03:00
Roman Khimov
5bca4d2313
io: expand panic tests to reach 100% coverage
2019-09-17 13:23:24 +03:00
Roman Khimov
d1a4e43c48
io: redo Serializable to return errors in BinReader/BinWriter
...
Further simplifies error handling.
2019-09-17 13:21:52 +03:00
Roman Khimov
e299a44983
io: drop Size() method from Serializable and associated
...
It's no longer needed after the io.GetVarSize() improvement. It's duplicating
a lot of EncodeBinary() logic also.
2019-09-17 13:21:45 +03:00
Roman Khimov
56c72b5c67
io: redo GetVarSize for Serializable things
...
Use writes to a fake io.Writer that counts the bytes. Allows us to kill Size()
methods as useless and duplicating lots of functionality.
2019-09-16 23:39:54 +03:00
Roman Khimov
0da9fe6946
io: move size calculator there
...
It's mostly used for Serializable and in other cases where one needs to
estimate binary-encoded size of the stucture. This also simplifies future
removal of the Size() from Serializable.
2019-09-16 23:39:54 +03:00