mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-19 13:21:37 +00:00
trie: deep-copy key
This commit is contained in:
parent
128a491ec9
commit
381cc24b34
1 changed files with 1 additions and 1 deletions
|
|
@ -219,7 +219,7 @@ func (t *StateTrie) UpdateStorageBatch(_ common.Address, keys [][]byte, values [
|
||||||
for _, key := range keys {
|
for _, key := range keys {
|
||||||
hk := crypto.Keccak256(key)
|
hk := crypto.Keccak256(key)
|
||||||
if t.preimages != nil {
|
if t.preimages != nil {
|
||||||
t.secKeyCache[common.Hash(hk)] = key
|
t.secKeyCache[common.Hash(hk)] = common.CopyBytes(key)
|
||||||
}
|
}
|
||||||
hkeys = append(hkeys, hk)
|
hkeys = append(hkeys, hk)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue