@@ -1637,15 +1637,15 @@ fn do_test_revoked_counterparty_htlc_tx_balances(anchors: bool) {
16371637 assert_eq ! ( as_commitment_claim_txn[ 0 ] . input[ 0 ] . previous_output. vout, 4 ) ; // Separate to_remote claim
16381638 check_spends ! ( as_commitment_claim_txn[ 0 ] , revoked_local_txn[ 0 ] ) ;
16391639 assert_eq ! ( as_commitment_claim_txn[ 1 ] . input. len( ) , 2 ) ;
1640- assert_eq ! ( as_commitment_claim_txn[ 1 ] . input[ 0 ] . previous_output. vout, 2 ) ;
1641- assert_eq ! ( as_commitment_claim_txn[ 1 ] . input[ 1 ] . previous_output. vout, 3 ) ;
1640+ assert ! ( as_commitment_claim_txn[ 1 ] . input. iter ( ) . any ( |inp| inp . previous_output. vout == 2 ) ) ;
1641+ assert ! ( as_commitment_claim_txn[ 1 ] . input. iter ( ) . any ( |inp| inp . previous_output. vout == 3 ) ) ;
16421642 check_spends ! ( as_commitment_claim_txn[ 1 ] , revoked_local_txn[ 0 ] ) ;
16431643 Some ( as_commitment_claim_txn. remove ( 0 ) )
16441644 } else {
16451645 assert_eq ! ( as_commitment_claim_txn[ 0 ] . input. len( ) , 3 ) ;
1646- assert_eq ! ( as_commitment_claim_txn[ 0 ] . input[ 0 ] . previous_output. vout, 2 ) ;
1647- assert_eq ! ( as_commitment_claim_txn[ 0 ] . input[ 1 ] . previous_output. vout, 0 ) ;
1648- assert_eq ! ( as_commitment_claim_txn[ 0 ] . input[ 2 ] . previous_output. vout, 1 ) ;
1646+ assert ! ( as_commitment_claim_txn[ 0 ] . input. iter ( ) . any ( |inp| inp . previous_output. vout == 2 ) ) ;
1647+ assert ! ( as_commitment_claim_txn[ 0 ] . input. iter ( ) . any ( |inp| inp . previous_output. vout == 0 ) ) ;
1648+ assert ! ( as_commitment_claim_txn[ 0 ] . input. iter ( ) . any ( |inp| inp . previous_output. vout == 1 ) ) ;
16491649 check_spends ! ( as_commitment_claim_txn[ 0 ] , revoked_local_txn[ 0 ] ) ;
16501650 None
16511651 }
@@ -1953,9 +1953,9 @@ fn do_test_revoked_counterparty_aggregated_claims(anchors: bool) {
19531953 Some ( claim_txn. remove ( 0 ) )
19541954 } else {
19551955 assert_eq ! ( claim_txn[ 0 ] . input. len( ) , 3 ) ;
1956- assert_eq ! ( claim_txn[ 0 ] . input[ 0 ] . previous_output. vout, 3 ) ;
1957- assert_eq ! ( claim_txn[ 0 ] . input[ 1 ] . previous_output. vout, 0 ) ;
1958- assert_eq ! ( claim_txn[ 0 ] . input[ 2 ] . previous_output. vout, 1 ) ;
1956+ assert ! ( claim_txn[ 0 ] . input. iter ( ) . any ( |inp| inp . previous_output. vout == 3 ) ) ;
1957+ assert ! ( claim_txn[ 0 ] . input. iter ( ) . any ( |inp| inp . previous_output. vout == 0 ) ) ;
1958+ assert ! ( claim_txn[ 0 ] . input. iter ( ) . any ( |inp| inp . previous_output. vout == 1 ) ) ;
19591959 check_spends ! ( claim_txn[ 0 ] , as_revoked_txn[ 0 ] ) ;
19601960 None
19611961 } ;
0 commit comments