This repository was archived by the owner on Feb 27, 2023. It is now read-only.
This repository was archived by the owner on Feb 27, 2023. It is now read-only.
Delete incorrectly tries to read side nodes #25
Closed
Description
#22 uncovered a bug whereby deleteWithSideNodes
tries to Get
side nodes, but those nodes may not exist in the tree. The case where these nodes don't exist in the tree is when a branch is added with AddBranch
(which only includes the side nodes hashes, but not their values).
This is mostly an issue with the DSMST, where it is constructed by adding branches rather than updating.
Specifically, here. This Get
only happens during the first iteration of the loop, i.e. it only applies to the sibling of the leaf node to delete. This node can either be another leaf node or an internal node, but cannot be a placeholder.