@@ -332,9 +332,8 @@ fn setup_many_chained_unconfirmed(
332
332
0 ,
333
333
) ]
334
334
} ,
335
- outputs : vec ! [ TxOutTemplate :: new( Amount :: ONE_BTC . to_sat( ) , Some ( 1 ) ) ] ,
336
- anchors : vec ! [ ] ,
337
335
last_seen : Some ( i as u64 ) ,
336
+ ..Default :: default ( )
338
337
} ) ;
339
338
}
340
339
@@ -363,14 +362,14 @@ fn setup_nested_conflicts(
363
362
for depth in 1 ..=graph_depth {
364
363
let mut next_outputs = Vec :: new ( ) ;
365
364
366
- for previous_output_name in previous_outputs. drain ( ..) {
365
+ for ( parent_index , previous_output_name) in previous_outputs. drain ( ..) . enumerate ( ) {
367
366
for conflict_i in 1 ..=conflicts_per_output {
368
- let tx_name = format ! ( "depth_{}_conflict_{}" , depth, conflict_i) ;
367
+ let tx_name = format ! (
368
+ "depth_{}_parent_{}_conflict_{}" ,
369
+ depth, parent_index, conflict_i
370
+ ) ;
369
371
370
- let mut last_seen = depth * conflict_i;
371
- if last_seen % 2 == 0 {
372
- last_seen /= 2 ;
373
- }
372
+ let last_seen = depth as u64 * conflict_i as u64 ;
374
373
375
374
templates. push ( TxTemplate {
376
375
tx_name : tx_name. clone ( ) . into ( ) ,
@@ -380,7 +379,7 @@ fn setup_nested_conflicts(
380
379
Some ( 0 ) ,
381
380
) ] ,
382
381
anchors : vec ! [ ] ,
383
- last_seen : Some ( last_seen as u64 ) ,
382
+ last_seen : Some ( last_seen) ,
384
383
} ) ;
385
384
386
385
next_outputs. push ( tx_name) ;
0 commit comments