From da74f8c7e48150758f2b86cee55b5a3d1111f130 Mon Sep 17 00:00:00 2001 From: Jerry Date: Mon, 14 Nov 2022 15:22:57 -0800 Subject: [PATCH] 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. --- core/state/statedb.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/state/statedb.go b/core/state/statedb.go index d10b5fd564..4b74cb6153 100644 --- a/core/state/statedb.go +++ b/core/state/statedb.go @@ -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) }