Skip to content

Commit d09ea33

Browse files
committed
fixup! more cleanup
1 parent e19bf5c commit d09ea33

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

lightning/src/ln/channel.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1987,7 +1987,7 @@ impl<ChanSigner: ChannelKeys> Channel<ChanSigner> {
19871987
let commitment_tx = self.build_commitment_transaction(self.cur_holder_commitment_transaction_number, &keys, true, false, feerate_per_kw, logger);
19881988
let commitment_txid = {
19891989
let trusted_tx = commitment_tx.0.trust();
1990-
let initial_commitment_bitcoin_tx = &trusted_tx.built_transaction();
1990+
let initial_commitment_bitcoin_tx = trusted_tx.built_transaction();
19911991
let sighash = initial_commitment_bitcoin_tx.get_sighash_all(&funding_script, self.channel_value_satoshis);
19921992

19931993
let commitment_txid = initial_commitment_bitcoin_tx.txid;
@@ -2015,9 +2015,6 @@ impl<ChanSigner: ChannelKeys> Channel<ChanSigner> {
20152015
return Err((None, ChannelError::Close(format!("Got wrong number of HTLC signatures ({}) from remote. It must be {}", msg.htlc_signatures.len(), num_htlcs))));
20162016
}
20172017

2018-
// TODO: Merge these two, sadly they are currently both required to be passed separately to
2019-
// ChannelMonitor:
2020-
let mut htlcs_without_source = Vec::with_capacity(htlcs_cloned.len());
20212018
let mut htlcs_and_sigs = Vec::with_capacity(htlcs_cloned.len());
20222019
for (idx, (htlc, source)) in htlcs_cloned.drain(..).enumerate() {
20232020
if let Some(_) = htlc.transaction_output_index {
@@ -2028,10 +2025,8 @@ impl<ChanSigner: ChannelKeys> Channel<ChanSigner> {
20282025
if let Err(_) = self.secp_ctx.verify(&htlc_sighash, &msg.htlc_signatures[idx], &keys.countersignatory_htlc_key) {
20292026
return Err((None, ChannelError::Close("Invalid HTLC tx signature from peer".to_owned())));
20302027
}
2031-
htlcs_without_source.push((htlc.clone(), Some(msg.htlc_signatures[idx])));
20322028
htlcs_and_sigs.push((htlc, Some(msg.htlc_signatures[idx]), source));
20332029
} else {
2034-
htlcs_without_source.push((htlc.clone(), None));
20352030
htlcs_and_sigs.push((htlc, None, source));
20362031
}
20372032
}

0 commit comments

Comments
 (0)