diff --git a/crates/chain/benches/canonicalization.rs b/crates/chain/benches/canonicalization.rs index 955ec8d31..93306ff48 100644 --- a/crates/chain/benches/canonicalization.rs +++ b/crates/chain/benches/canonicalization.rs @@ -332,9 +332,8 @@ fn setup_many_chained_unconfirmed( 0, )] }, - outputs: vec![TxOutTemplate::new(Amount::ONE_BTC.to_sat(), Some(1))], - anchors: vec![], last_seen: Some(i as u64), + ..Default::default() }); } @@ -363,14 +362,14 @@ fn setup_nested_conflicts( for depth in 1..=graph_depth { let mut next_outputs = Vec::new(); - for previous_output_name in previous_outputs.drain(..) { + for (parent_index, previous_output_name) in previous_outputs.drain(..).enumerate() { for conflict_i in 1..=conflicts_per_output { - let tx_name = format!("depth_{}_conflict_{}", depth, conflict_i); + let tx_name = format!( + "depth_{}_parent_{}_conflict_{}", + depth, parent_index, conflict_i + ); - let mut last_seen = depth * conflict_i; - if last_seen % 2 == 0 { - last_seen /= 2; - } + let last_seen = depth as u64 * conflict_i as u64; templates.push(TxTemplate { tx_name: tx_name.clone().into(), @@ -380,7 +379,7 @@ fn setup_nested_conflicts( Some(0), )], anchors: vec![], - last_seen: Some(last_seen as u64), + last_seen: Some(last_seen), }); next_outputs.push(tx_name);