core/state: avoid data race (#29924)

ci-i386-disable-cache
rjl493456442 6 months ago committed by GitHub
parent 682ae838b2
commit 125fb1ff58
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      core/state/statedb.go

@ -1211,8 +1211,8 @@ func (s *StateDB) commit(deleteEmptyObjects bool) (*stateUpdate, error) {
} }
lock.Lock() lock.Lock()
updates[obj.addrHash] = update updates[obj.addrHash] = update
lock.Unlock()
s.StorageCommits = time.Since(start) // overwrite with the longest storage commit runtime s.StorageCommits = time.Since(start) // overwrite with the longest storage commit runtime
lock.Unlock()
return nil return nil
}) })
} }

Loading…
Cancel
Save