antouhou / rs-merkle

The most advanced Merkle tree library for Rust
MIT License
172 stars 45 forks source link

fix: sort indices correctly #29

Closed themighty1 closed 1 year ago

themighty1 commented 1 year ago

This PR fixes a bug where "unsorted" indices were used instead of the "sorted" ones. This would cause a failure during a proof verification if indices to-be-verified were passed unsorted.

The included test fails on the current v 1.4.1 but passes with the fix applied.

Also fixes a test for a previous PR https://github.com/antouhou/rs-merkle/pull/28

themighty1 commented 1 year ago

i'll decouple these fixes in separate PRs