forked from cerc-io/plugeth
core/state/snapshot: fix race condition (#24685)
Fixes three race conditions found through fuzzing by David Theodore
This commit is contained in:
@@ -258,6 +258,9 @@ func (dl *diffLayer) Root() common.Hash {
|
||||
|
||||
// Parent returns the subsequent layer of a diff layer.
|
||||
func (dl *diffLayer) Parent() snapshot {
|
||||
dl.lock.RLock()
|
||||
defer dl.lock.RUnlock()
|
||||
|
||||
return dl.parent
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user