- /// Builds the htlc-success or htlc-timeout transaction which spends a given HTLC output
- /// @local is used only to convert relevant internal structures which refer to remote vs local
- /// to decide value of outputs and direction of HTLCs.
- fn build_htlc_transaction(&self, prev_hash: &Txid, htlc: &HTLCOutputInCommitment, local: bool, keys: &TxCreationKeys, feerate_per_kw: u32) -> Transaction {
- chan_utils::build_htlc_transaction(prev_hash, feerate_per_kw,
- if local {
- self.get_counterparty_selected_contest_delay().unwrap()
- } else {
- self.get_holder_selected_contest_delay()
- }, htlc, &keys.broadcaster_delayed_payment_key, &keys.revocation_key)
- }
-