- // ChannelMonitor: HTLC-Success tx + HTLC-Timeout RBF Bump, ChannelManager: local commitment tx + HTLC-Success tx
- assert_eq!(b_txn.len(), 4);
- check_spends!(b_txn[2], chan_1.3);
- check_spends!(b_txn[3], b_txn[2]);
- let (htlc_success_claim, htlc_timeout_bumped) =
- if b_txn[0].input[0].previous_output.txid == commitment_tx[0].txid()
- { (&b_txn[0], &b_txn[1]) } else { (&b_txn[1], &b_txn[0]) };
- check_spends!(htlc_success_claim, commitment_tx[0]);
- assert_eq!(htlc_success_claim.input[0].witness.clone().last().unwrap().len(), OFFERED_HTLC_SCRIPT_WEIGHT);
- assert!(htlc_success_claim.output[0].script_pubkey.is_v0_p2wpkh()); // direct payment
- assert_eq!(htlc_success_claim.lock_time, 0); // Success tx
- check_spends!(htlc_timeout_bumped, c_txn[1]); // timeout tx on C remote commitment tx, issued by ChannelMonitor
- assert_ne!(htlc_timeout_bumped.lock_time, 0); // Success tx
+ // ChannelMonitor: HTLC-Success tx, ChannelManager: local commitment tx + HTLC-Success tx
+ assert_eq!(b_txn.len(), 3);
+ check_spends!(b_txn[1], chan_1.3);
+ check_spends!(b_txn[2], b_txn[1]);
+ check_spends!(b_txn[0], commitment_tx[0]);
+ assert_eq!(b_txn[0].input[0].witness.clone().last().unwrap().len(), OFFERED_HTLC_SCRIPT_WEIGHT);
+ assert!(b_txn[0].output[0].script_pubkey.is_v0_p2wpkh()); // direct payment
+ assert_eq!(b_txn[0].lock_time, 0); // Success tx