From 381cc24b340af671bdf64788433a8f1e4b78f93a Mon Sep 17 00:00:00 2001 From: Gary Rong Date: Thu, 18 Jun 2026 13:59:35 +0800 Subject: [PATCH] trie: deep-copy key --- trie/secure_trie.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trie/secure_trie.go b/trie/secure_trie.go index f2176310d0..9f6cea9790 100644 --- a/trie/secure_trie.go +++ b/trie/secure_trie.go @@ -219,7 +219,7 @@ func (t *StateTrie) UpdateStorageBatch(_ common.Address, keys [][]byte, values [ for _, key := range keys { hk := crypto.Keccak256(key) if t.preimages != nil { - t.secKeyCache[common.Hash(hk)] = key + t.secKeyCache[common.Hash(hk)] = common.CopyBytes(key) } hkeys = append(hkeys, hk) }