mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-22 20:56:42 +00:00
Update core/state/snapshot/snapshot.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
parent
088c5c7b1b
commit
d9cf93f9bb
1 changed files with 1 additions and 1 deletions
|
|
@ -308,7 +308,7 @@ func (t *Tree) Snapshots(root common.Hash, limits int, nodisk bool) []Snapshot {
|
||||||
defer t.lock.RUnlock()
|
defer t.lock.RUnlock()
|
||||||
|
|
||||||
var ret []Snapshot
|
var ret []Snapshot
|
||||||
for layer := t.layers[root]; layer != nil && limits != 0; layer, limits = layer.Parent(), limits-1 {
|
for layer := t.layers[root]; layer != nil && limits > 0; layer, limits = layer.Parent(), limits-1 {
|
||||||
if _, isdisk := layer.(*diskLayer); isdisk && nodisk {
|
if _, isdisk := layer.(*diskLayer); isdisk && nodisk {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue