Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: sort leaves by their hashes #10

Merged
merged 4 commits into from
Dec 22, 2024

Conversation

0xfffxfff
Copy link
Contributor

This PR fixes the implementation of the standard tree by sorting the leaves by their hashes. Test included.

For reference this is implemented in the openzeppelin implementation here: https://github.com/OpenZeppelin/merkle-tree/blob/master/src/merkletree.ts#L69-L71

@0xfffxfff
Copy link
Contributor Author

Alright! Added a separate method of_sorted and restored the original method of.

@0xfffxfff 0xfffxfff requested a review from rkdud007 December 22, 2024 00:11
Copy link
Owner

@rkdud007 rkdud007 left a comment

Choose a reason for hiding this comment

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

thanks fix ci then lgtm

@0xfffxfff 0xfffxfff requested a review from rkdud007 December 22, 2024 15:11
@rkdud007 rkdud007 merged commit 9665610 into rkdud007:main Dec 22, 2024
1 check passed
@rkdud007
Copy link
Owner

thanks for contribution!

@0xfffxfff 0xfffxfff deleted the bugfix/sort-leaves-by-hash branch December 22, 2024 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants