mirror of
https://github.com/mimblewimble/grin.git
synced 2025-01-20 19:11:08 +03:00
replace subtree with pruned root (#3576)
no need to remove sibling explicitly
This commit is contained in:
parent
57f4592499
commit
7487ffd75b
1 changed files with 2 additions and 1 deletions
|
@ -236,9 +236,10 @@ impl PruneList {
|
|||
loop {
|
||||
let (parent, sibling) = family(current);
|
||||
if self.is_pruned_root(sibling) {
|
||||
self.bitmap.remove(sibling as u32);
|
||||
current = parent;
|
||||
} else {
|
||||
// replace the entire subtree with the single pruned root
|
||||
self.bitmap.remove_range(pmmr::bintree_range(current));
|
||||
self.bitmap.add(current as u32);
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue