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) }