antouhou / rs-merkle

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

fix: sort indices correctly #30

Closed themighty1 closed 9 months 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.

themighty1 commented 1 year ago

@antouhou , hey, will you be able to look into this PR?

ququzone commented 9 months ago

@antouhou Hey, this is really a bug, this PR should be merged.

antouhou commented 9 months ago

Hi @themighty1 @ququzone! I've released version 1.4.2 on the crates.io that contains that fix: https://crates.io/crates/rs_merkle. Thank you!