Skip to content

Commit 2f70398

Browse files
committed
Revert "core/state/snapshot: add a missing lock (ethereum#30001)"
This reverts commit 7688f98.
1 parent 61f7ee8 commit 2f70398

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

core/state/snapshot/snapshot.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -832,8 +832,6 @@ func (t *Tree) disklayer() *diskLayer {
832832
case *diskLayer:
833833
return layer
834834
case *diffLayer:
835-
layer.lock.RLock()
836-
defer layer.lock.RUnlock()
837835
return layer.origin
838836
default:
839837
panic(fmt.Sprintf("%T: undefined layer", snap))
@@ -865,7 +863,7 @@ func (t *Tree) generating() (bool, error) {
865863
return layer.genMarker != nil, nil
866864
}
867865

868-
// DiskRoot is an external helper function to return the disk layer root.
866+
// DiskRoot is a external helper function to return the disk layer root.
869867
func (t *Tree) DiskRoot() common.Hash {
870868
t.lock.Lock()
871869
defer t.lock.Unlock()

0 commit comments

Comments
 (0)