@@ -653,7 +653,7 @@ pub fn update_storage_and_augment_bitcoin_block_with_inscription_transfer_data(
653
653
// todo: handle ordinals coinbase spend
654
654
655
655
for ( tx_index, new_tx) in block. transactions . iter_mut ( ) . skip ( 1 ) . enumerate ( ) {
656
- for input in new_tx. metadata . inputs . iter ( ) {
656
+ for ( input_index , input) in new_tx. metadata . inputs . iter ( ) . enumerate ( ) {
657
657
// input.previous_output.txid
658
658
let outpoint_pre_transfer = format_outpoint_to_watch (
659
659
& input. previous_output . txid ,
@@ -679,7 +679,6 @@ pub fn update_storage_and_augment_bitcoin_block_with_inscription_transfer_data(
679
679
// Question is: are inscriptions moving to a new output,
680
680
// burnt or lost in fees and transfered to the miner?
681
681
682
- let ( _, input_index) = parse_outpoint_to_watch ( & outpoint_pre_transfer) ;
683
682
let inputs = new_tx
684
683
. metadata
685
684
. inputs
@@ -976,6 +975,15 @@ fn test_identify_next_output_index_destination() {
976
975
compute_next_satpoint_data( 2 , 45 , & vec![ 20 , 30 , 45 ] , & vec![ 20 , 30 , 45 ] ) ,
977
976
SatPosition :: Fee ( 0 )
978
977
) ;
978
+ assert_eq ! (
979
+ compute_next_satpoint_data(
980
+ 2 ,
981
+ 0 ,
982
+ & vec![ 1000 , 600 , 546 , 63034 ] ,
983
+ & vec![ 1600 , 10000 , 15000 ]
984
+ ) ,
985
+ SatPosition :: Output ( ( 1 , 0 ) )
986
+ ) ;
979
987
}
980
988
981
989
#[ test]
0 commit comments