+ let outbound_htlc = $holder_tx == htlc_output.offered;
+ if !outbound_htlc || revocation_sig_claim {
+ self.onchain_events_awaiting_threshold_conf.push(OnchainEventEntry {
+ txid: tx.txid(), height,
+ event: OnchainEvent::HTLCSpendConfirmation {
+ input_idx: input.previous_output.vout,
+ preimage: if accepted_preimage_claim || offered_preimage_claim {
+ Some(payment_preimage) } else { None },
+ // If this is a payment to us (!outbound_htlc, above),
+ // wait for the CSV delay before dropping the HTLC from
+ // claimable balance if the claim was an HTLC-Success
+ // transaction.
+ on_to_local_output_csv: if accepted_preimage_claim {
+ Some(self.on_holder_tx_csv) } else { None },
+ },
+ });
+ } else {
+ // Outbound claims should always have payment_data, unless
+ // we've already failed the HTLC as the commitment transaction
+ // which was broadcasted was revoked. In that case, we should
+ // spend the HTLC output here immediately, and expose that fact
+ // as a ClaimableBalance, something which we do not yet do.
+ // TODO: Track the above as claimable!
+ }