- let mut htlcs = Vec::with_capacity(htlc_outputs.len());
- for htlc in htlc_outputs.clone() {
- if let Some(_) = htlc.0.transaction_output_index {
- htlcs.push((htlc.0, htlc.1, None));
- }
- }
- commitment_tx.set_htlc_cache(local_keys.clone(), feerate_per_kw, htlcs);
+ let new_local_signed_commitment_tx = LocalSignedTx {
+ txid,
+ revocation_key: commitment_tx.local_keys.revocation_key,
+ a_htlc_key: commitment_tx.local_keys.a_htlc_key,
+ b_htlc_key: commitment_tx.local_keys.b_htlc_key,
+ delayed_payment_key: commitment_tx.local_keys.a_delayed_payment_key,
+ per_commitment_point: commitment_tx.local_keys.per_commitment_point,
+ feerate_per_kw: commitment_tx.feerate_per_kw,
+ htlc_outputs: htlc_outputs,
+ };