Commit graph

7 commits

Author SHA1 Message Date
Elizaveta Chichindaeva
28908aa3cf [#2442] English Check
Signed-off-by: Elizaveta Chichindaeva <elizaveta@nspcc.ru>
2022-05-04 19:48:27 +03:00
Roman Khimov
2e39f1a1e3 io: drop one allocation from NewBufBinWriter 2021-08-20 11:38:42 +03:00
Roman Khimov
b8dd284d3d io: don't allocate new error on every call to Bytes()
It makes no sense and we're using Bytes() pretty often.
2021-08-20 10:58:51 +03:00
Evgenii Stratonikov
c2f70a179b Revert "mpt: do not allocate new buffer when updating dirty node"
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}`
2020-12-25 18:42:47 +03:00
Evgenii Stratonikov
168ba7960c mpt: do not allocate new buffer when updating dirty node
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).
2020-12-25 11:33:49 +03:00
Vsevolod Brekelov
d02673c112 vm: add bufBinWriter to emit functions in order to catch errors 2019-12-02 13:04:33 +03:00
Roman Khimov
5bf00db2c9 io: move BinReader/BinWriter there, redo Serializable with it
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)