good morning!!!!

Skip to content
Snippets Groups Projects
Unverified Commit a5a58e97 authored by Alex Sharov's avatar Alex Sharov Committed by GitHub
Browse files

collector already does copy, no reason to copy in buffer (#2396)

parent 13b29abc
No related branches found
No related tags found
No related merge requests found
......@@ -7,7 +7,6 @@ import (
"strconv"
"github.com/c2h5oh/datasize"
"github.com/ledgerwatch/erigon/common"
"github.com/ledgerwatch/erigon/common/dbutils"
)
......@@ -212,11 +211,7 @@ func (b *oldestEntrySortableBuffer) Put(k, v []byte) {
return
}
b.size += len(k)
b.size += len(v)
if v != nil {
v = common.CopyBytes(v)
}
b.size += len(k) + len(v)
b.entries[ks] = v
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment