This reverts commit 168ba7960c.
It seems, there are some problems with it:
`2020-12-25T18:13:07.476+0300 WARN blockQueue: failed adding block into the blockchain {"error": "error while trying to apply MPT changes: unexpected EOF", "blockHeight": 9729, "nextIndex": 9730}`
Running time becomes faster under high load while staying the same in
the average case.
Memory allocation done in `Trie` goes down by about ~10% (even more,
actually).
The logic here is that we'll have all binary encoding/decoding done via our io
package, which simplifies error handling. This functionality doesn't belong to
util, so it's moved.
This also expands BufBinWriter with Reset() method to fit the needs of core
package.
2019-09-16 23:39:51 +03:00
Renamed from pkg/util/binaryBufWriter.go (Browse further)