@@ -1636,15 +1636,15 @@ fn do_test_revoked_counterparty_htlc_tx_balances(anchors: bool) {
16361636 assert_eq ! ( as_commitment_claim_txn[ 0 ] . input[ 0 ] . previous_output. vout, 4 ) ; // Separate to_remote claim
16371637 check_spends ! ( as_commitment_claim_txn[ 0 ] , revoked_local_txn[ 0 ] ) ;
16381638 assert_eq ! ( as_commitment_claim_txn[ 1 ] . input. len( ) , 2 ) ;
1639- assert_eq ! ( as_commitment_claim_txn[ 1 ] . input[ 0 ] . previous_output. vout, 2 ) ;
1640- assert_eq ! ( as_commitment_claim_txn[ 1 ] . input[ 1 ] . previous_output. vout, 3 ) ;
1639+ assert ! ( as_commitment_claim_txn[ 1 ] . input. iter ( ) . any ( |inp| inp . previous_output. vout == 2 ) ) ;
1640+ assert ! ( as_commitment_claim_txn[ 1 ] . input. iter ( ) . any ( |inp| inp . previous_output. vout == 3 ) ) ;
16411641 check_spends ! ( as_commitment_claim_txn[ 1 ] , revoked_local_txn[ 0 ] ) ;
16421642 Some ( as_commitment_claim_txn. remove ( 0 ) )
16431643 } else {
16441644 assert_eq ! ( as_commitment_claim_txn[ 0 ] . input. len( ) , 3 ) ;
1645- assert_eq ! ( as_commitment_claim_txn[ 0 ] . input[ 0 ] . previous_output. vout, 2 ) ;
1646- assert_eq ! ( as_commitment_claim_txn[ 0 ] . input[ 1 ] . previous_output. vout, 0 ) ;
1647- assert_eq ! ( as_commitment_claim_txn[ 0 ] . input[ 2 ] . previous_output. vout, 1 ) ;
1645+ assert ! ( as_commitment_claim_txn[ 0 ] . input. iter ( ) . any ( |inp| inp . previous_output. vout == 2 ) ) ;
1646+ assert ! ( as_commitment_claim_txn[ 0 ] . input. iter ( ) . any ( |inp| inp . previous_output. vout == 0 ) ) ;
1647+ assert ! ( as_commitment_claim_txn[ 0 ] . input. iter ( ) . any ( |inp| inp . previous_output. vout == 1 ) ) ;
16481648 check_spends ! ( as_commitment_claim_txn[ 0 ] , revoked_local_txn[ 0 ] ) ;
16491649 None
16501650 }
@@ -1954,9 +1954,9 @@ fn do_test_revoked_counterparty_aggregated_claims(anchors: bool) {
19541954 Some ( claim_txn. remove ( 0 ) )
19551955 } else {
19561956 assert_eq ! ( claim_txn[ 0 ] . input. len( ) , 3 ) ;
1957- assert_eq ! ( claim_txn[ 0 ] . input[ 0 ] . previous_output. vout, 3 ) ;
1958- assert_eq ! ( claim_txn[ 0 ] . input[ 1 ] . previous_output. vout, 0 ) ;
1959- assert_eq ! ( claim_txn[ 0 ] . input[ 2 ] . previous_output. vout, 1 ) ;
1957+ assert ! ( claim_txn[ 0 ] . input. iter ( ) . any ( |inp| inp . previous_output. vout == 3 ) ) ;
1958+ assert ! ( claim_txn[ 0 ] . input. iter ( ) . any ( |inp| inp . previous_output. vout == 0 ) ) ;
1959+ assert ! ( claim_txn[ 0 ] . input. iter ( ) . any ( |inp| inp . previous_output. vout == 1 ) ) ;
19601960 check_spends ! ( claim_txn[ 0 ] , as_revoked_txn[ 0 ] ) ;
19611961 None
19621962 } ;
0 commit comments