Skip to content

Commit 125fb1f

Browse files
authored
core/state: avoid data race (#29924)
1 parent 682ae83 commit 125fb1f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/state/statedb.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1211,8 +1211,8 @@ func (s *StateDB) commit(deleteEmptyObjects bool) (*stateUpdate, error) {
12111211
}
12121212
lock.Lock()
12131213
updates[obj.addrHash] = update
1214-
lock.Unlock()
12151214
s.StorageCommits = time.Since(start) // overwrite with the longest storage commit runtime
1215+
lock.Unlock()
12161216
return nil
12171217
})
12181218
}

0 commit comments

Comments
 (0)