mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-25 14:16:44 +00:00
Clone secKeyCache to a new stateTrie instance
This commit is contained in:
parent
1d7fbc0fbc
commit
4c0029282b
1 changed files with 3 additions and 1 deletions
|
|
@ -17,6 +17,8 @@
|
||||||
package trie
|
package trie
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"maps"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/ethereum/go-ethereum/common"
|
||||||
"github.com/ethereum/go-ethereum/core/types"
|
"github.com/ethereum/go-ethereum/core/types"
|
||||||
"github.com/ethereum/go-ethereum/crypto"
|
"github.com/ethereum/go-ethereum/crypto"
|
||||||
|
|
@ -273,7 +275,7 @@ func (t *StateTrie) Copy() *StateTrie {
|
||||||
return &StateTrie{
|
return &StateTrie{
|
||||||
trie: *t.trie.Copy(),
|
trie: *t.trie.Copy(),
|
||||||
db: t.db,
|
db: t.db,
|
||||||
secKeyCache: make(map[common.Hash][]byte),
|
secKeyCache: maps.Clone(t.secKeyCache),
|
||||||
preimages: t.preimages,
|
preimages: t.preimages,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue