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)
|
||||
}
|
||||
for root, layer := range tree.layers {
|
||||
if dl, ok := layer.(*diskLayer); ok && dl.isStale() {
|
||||
remove(root)
|
||||
}
|
||||
// diskLayer only has one and is the bottom layer.
|
||||
if dl := tree.bottom(); dl.isStale() {
|
||||
remove(root)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue