Skip to content

Commit d9cf93f

Browse files
mask-ppCopilot
andauthored
Update core/state/snapshot/snapshot.go
Co-authored-by: Copilot <[email protected]>
1 parent 088c5c7 commit d9cf93f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/state/snapshot/snapshot.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ func (t *Tree) Snapshots(root common.Hash, limits int, nodisk bool) []Snapshot {
308308
defer t.lock.RUnlock()
309309

310310
var ret []Snapshot
311-
for layer := t.layers[root]; layer != nil && limits != 0; layer, limits = layer.Parent(), limits-1 {
311+
for layer := t.layers[root]; layer != nil && limits > 0; layer, limits = layer.Parent(), limits-1 {
312312
if _, isdisk := layer.(*diskLayer); isdisk && nodisk {
313313
break
314314
}

0 commit comments

Comments
 (0)