Skip to content

Commit

Permalink
fix(iota-genesis-builder): add assertion about the original vested he…
Browse files Browse the repository at this point in the history
…ader
  • Loading branch information
miker83z committed Jan 17, 2025
1 parent 9bf7481 commit ded9306
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/iota-genesis-builder/src/stardust/process_outputs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,8 @@ impl<I> SwapSplitIterator<I> {
// index being a number in the range 1 to OUTPUT_INDEX_MAX is safe because
// vesting output indexes are always 0
// https://github.com/iotaledger/snapshot-tool-new-supply
let index = (pos as u16 % (OUTPUT_INDEX_MAX - 1)) + 1;
assert!(original_header.output_id().index() == 0);
let index = 1 + (pos as u16 % (OUTPUT_INDEX_MAX - 1));
(
*original_header.output_id().transaction_id(),
OutputIndex::new(index).unwrap(),
Expand Down

0 comments on commit ded9306

Please sign in to comment.