Skip to content

Commit

Permalink
Merge pull request #100 from mwcproject/v5.3.3/sync
Browse files Browse the repository at this point in the history
debug assert fix
  • Loading branch information
bayk authored Jan 6, 2025
2 parents f6b5b06 + e6ec8c1 commit 11b6b72
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions chain/src/txhashset/desegmenter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -938,9 +938,9 @@ impl Desegmenter {
// prunable PMMR, we can use variable length
// Note, every segment have to have some data
let leaves_num = pmmr::n_leaves(target_mmr_size);
// last leave expected to be in the bitmap because it is outputs that can be spandable
// last leave expected to be in the bitmap because it is outputs that can be spendable
debug_assert!(bitmap.contains((leaves_num - 1) as u32));
debug_assert!(!bitmap.contains((leaves_num - 1 + 1) as u32));
debug_assert!(leaves_num % 2 == 1 || !bitmap.contains((leaves_num - 1 + 1) as u32));
debug_assert!(!bitmap.contains((leaves_num - 1 + 2) as u32));

let mut current_leave = 0;
Expand Down

0 comments on commit 11b6b72

Please sign in to comment.