trie: avoid copybytes for stacktrie #22686 (#1063)

Co-authored-by: Martin Holst Swende <martin@swende.se>
This commit is contained in:
Daniel Liu 2025-06-03 10:58:46 +08:00 committed by GitHub
parent 5b071d1b0d
commit 63ff193931
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -576,8 +576,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)