good morning!!!!

Skip to content
Snippets Groups Projects
Unverified Commit e43ac532 authored by Péter Szilágyi's avatar Péter Szilágyi Committed by GitHub
Browse files

Merge pull request #22686 from holiman/minor_fixes

core/state/snapshot: avoid copybytes for stacktrie
parents f79cce5d 09d44e99
No related branches found
No related tags found
No related merge requests found
......@@ -317,7 +317,7 @@ func (dl *diskLayer) proveRange(stats *generatorStats, root common.Hash, prefix
if origin == nil && !diskMore {
stackTr := trie.NewStackTrie(nil)
for i, key := range keys {
stackTr.TryUpdate(key, common.CopyBytes(vals[i]))
stackTr.TryUpdate(key, vals[i])
}
if gotRoot := stackTr.Hash(); gotRoot != root {
return &proofResult{
......
......@@ -830,8 +830,8 @@ func TestCommitSequenceStackTrie(t *testing.T) {
val = make([]byte, 1+prng.Intn(1024))
}
prng.Read(val)
trie.TryUpdate(key, common.CopyBytes(val))
stTrie.TryUpdate(key, common.CopyBytes(val))
trie.TryUpdate(key, val)
stTrie.TryUpdate(key, val)
}
// Flush trie -> database
root, _ := trie.Commit(nil)
......
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