Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tree.go
Original file line number Diff line number Diff line change
Expand Up @@ -1384,9 +1384,9 @@ func (n *LeafNode) Delete(k []byte, _ NodeResolverFn) (bool, error) {

// Clear the corresponding commitment
if k[StemSize] < 128 {
n.c1 = nil
n.c1 = new(Point).SetIdentity()
} else {
n.c2 = nil
n.c2 = new(Point).SetIdentity()
Comment on lines -1387 to +1389
Copy link
Collaborator

@jsign jsign Apr 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new changes are aligned on how NewLeafNode works, right? Look here.

Looks like in that else we aren't doing else if count > 0 {, which means cfg.CommitToPoly is always called (apart from the optimized case of emptyCodeHash) which never return nil.

So maybe this means the current change is a more reasonable action than what we had before this PR?

}

return false, nil
Expand Down
Loading