Fix bugs in delete() pseudocode

This commit is contained in:
Jack Grigg 2020-03-04 08:45:12 +13:00 committed by Daira Hopwood
parent 1ef1388501
commit a627029132
1 changed files with 2 additions and 2 deletions

View File

@ -531,8 +531,8 @@ in the right subtree of the MMR root.
# until we reach a leaf
subtree_root = root.right_child
while subtree_root.left_child:
peaks.push(tmp_root.left_child)
subtree_root = tmp_root.right_child
peaks.push(subtree_root.left_child)
subtree_root = subtree_root.right_child
new_root = bag_peaks(peaks)
return new_root