core/state: avoid data race

This commit is contained in:
Gary Rong 2024-06-04 20:45:39 +08:00
parent 68c0ec0815
commit bb6888822d

View file

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