allocate a new map for secKeyCache

This commit is contained in:
maskpp 2025-06-04 21:22:41 +08:00
parent 4c0029282b
commit 00ca0bb024

View file

@ -17,8 +17,6 @@
package trie
import (
"maps"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/crypto"
@ -275,7 +273,7 @@ func (t *StateTrie) Copy() *StateTrie {
return &StateTrie{
trie: *t.trie.Copy(),
db: t.db,
secKeyCache: maps.Clone(t.secKeyCache),
secKeyCache: make(map[common.Hash][]byte),
preimages: t.preimages,
}
}