simplify path layerTree logic

This commit is contained in:
maskpp 2024-04-25 18:06:38 +08:00
parent 691291b42b
commit 949972d6b1

View file

@ -187,7 +187,7 @@ func (tree *layerTree) cap(root common.Hash, layers int) error {
}
// diskLayer only has one and is the bottom layer.
if dl := tree.bottom(); dl != nil && dl.isStale() {
remove(dl.root)
remove(dl.rootHash())
}
return nil
}