mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 23:26:44 +00:00
Use a new hasher for each account access
There seems to be an issue when hasher is used concurrently in parallel execution. This change will ensure no hasher is used by multiple executors at the same time.
This commit is contained in:
parent
2060b4f61c
commit
da74f8c7e4
1 changed files with 1 additions and 1 deletions
|
|
@ -867,7 +867,7 @@ func (s *StateDB) getDeletedStateObject(addr common.Address) *stateObject {
|
|||
var data *types.StateAccount
|
||||
if s.snap != nil { // nolint
|
||||
start := time.Now()
|
||||
acc, err := s.snap.Account(crypto.HashData(s.hasher, addr.Bytes()))
|
||||
acc, err := s.snap.Account(crypto.HashData(crypto.NewKeccakState(), addr.Bytes()))
|
||||
if metrics.EnabledExpensive {
|
||||
s.SnapshotAccountReads += time.Since(start)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue