mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 18:32:23 +00:00
simplify path layerTree logic
This commit is contained in:
parent
a0282fc94f
commit
f3c389052e
1 changed files with 3 additions and 4 deletions
|
|
@ -185,10 +185,9 @@ func (tree *layerTree) cap(root common.Hash, layers int) error {
|
||||||
}
|
}
|
||||||
delete(children, root)
|
delete(children, root)
|
||||||
}
|
}
|
||||||
for root, layer := range tree.layers {
|
// diskLayer only has one and is the bottom layer.
|
||||||
if dl, ok := layer.(*diskLayer); ok && dl.isStale() {
|
if dl := tree.bottom(); dl.isStale() {
|
||||||
remove(root)
|
remove(root)
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue