@@ -3332,13 +3332,12 @@ macro_rules! handle_monitor_update_completion {
33323332 None
33333333 };
33343334
3335- let (htlc_forwards, decode_update_add_htlcs) = $self.handle_channel_resumption(
3335+ let decode_update_add_htlcs = $self.handle_channel_resumption(
33363336 &mut $peer_state.pending_msg_events,
33373337 $chan,
33383338 updates.raa,
33393339 updates.commitment_update,
33403340 updates.commitment_order,
3341- updates.accepted_htlcs,
33423341 updates.pending_update_adds,
33433342 updates.funding_broadcastable,
33443343 updates.channel_ready,
@@ -3361,7 +3360,6 @@ macro_rules! handle_monitor_update_completion {
33613360 cp_node_id,
33623361 unbroadcasted_batch_funding_txid,
33633362 update_actions,
3364- htlc_forwards,
33653363 decode_update_add_htlcs,
33663364 updates.finalized_claimed_htlcs,
33673365 updates.failed_htlcs,
@@ -9555,7 +9553,6 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
95559553 &self, channel_id: ChannelId, counterparty_node_id: PublicKey,
95569554 unbroadcasted_batch_funding_txid: Option<Txid>,
95579555 update_actions: Vec<MonitorUpdateCompletionAction>,
9558- htlc_forwards: Option<PerSourcePendingForward>,
95599556 decode_update_add_htlcs: Option<(u64, Vec<msgs::UpdateAddHTLC>)>,
95609557 finalized_claimed_htlcs: Vec<(HTLCSource, Option<AttributionData>)>,
95619558 failed_htlcs: Vec<(HTLCSource, PaymentHash, HTLCFailReason)>,
@@ -9611,9 +9608,6 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
96119608
96129609 self.handle_monitor_update_completion_actions(update_actions);
96139610
9614- if let Some(forwards) = htlc_forwards {
9615- self.forward_htlcs(&mut [forwards][..]);
9616- }
96179611 if let Some(decode) = decode_update_add_htlcs {
96189612 self.push_decode_update_add_htlcs(decode);
96199613 }
@@ -9826,17 +9820,16 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
98269820 fn handle_channel_resumption(&self, pending_msg_events: &mut Vec<MessageSendEvent>,
98279821 channel: &mut FundedChannel<SP>, raa: Option<msgs::RevokeAndACK>,
98289822 commitment_update: Option<msgs::CommitmentUpdate>, commitment_order: RAACommitmentOrder,
9829- pending_forwards: Vec<(PendingHTLCInfo, u64)>, pending_update_adds: Vec<msgs::UpdateAddHTLC>,
9830- funding_broadcastable: Option<Transaction>,
9823+ pending_update_adds: Vec<msgs::UpdateAddHTLC>, funding_broadcastable: Option<Transaction>,
98319824 channel_ready: Option<msgs::ChannelReady>, announcement_sigs: Option<msgs::AnnouncementSignatures>,
98329825 tx_signatures: Option<msgs::TxSignatures>, tx_abort: Option<msgs::TxAbort>,
98339826 channel_ready_order: ChannelReadyOrder,
9834- ) -> ( Option<(u64, PublicKey, OutPoint, ChannelId, u128, Vec<(PendingHTLCInfo, u64)>)>, Option<(u64, Vec< msgs::UpdateAddHTLC>)>) {
9827+ ) -> Option<(u64, Vec<msgs::UpdateAddHTLC>)> {
98359828 let logger = WithChannelContext::from(&self.logger, &channel.context, None);
9836- log_trace!(logger, "Handling channel resumption with {} RAA, {} commitment update, {} pending forwards, {} pending update_add_htlcs, {}broadcasting funding, {} channel ready, {} announcement, {} tx_signatures, {} tx_abort",
9829+ log_trace!(logger, "Handling channel resumption with {} RAA, {} commitment update, {} pending update_add_htlcs, {}broadcasting funding, {} channel ready, {} announcement, {} tx_signatures, {} tx_abort",
98379830 if raa.is_some() { "an" } else { "no" },
98389831 if commitment_update.is_some() { "a" } else { "no" },
9839- pending_forwards.len(), pending_update_adds.len(),
9832+ pending_update_adds.len(),
98409833 if funding_broadcastable.is_some() { "" } else { "not " },
98419834 if channel_ready.is_some() { "sending" } else { "without" },
98429835 if announcement_sigs.is_some() { "sending" } else { "without" },
@@ -9847,14 +9840,6 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
98479840 let counterparty_node_id = channel.context.get_counterparty_node_id();
98489841 let outbound_scid_alias = channel.context.outbound_scid_alias();
98499842
9850- let mut htlc_forwards = None;
9851- if !pending_forwards.is_empty() {
9852- htlc_forwards = Some((
9853- outbound_scid_alias, channel.context.get_counterparty_node_id(),
9854- channel.funding.get_funding_txo().unwrap(), channel.context.channel_id(),
9855- channel.context.get_user_id(), pending_forwards
9856- ));
9857- }
98589843 let mut decode_update_add_htlcs = None;
98599844 if !pending_update_adds.is_empty() {
98609845 decode_update_add_htlcs = Some((outbound_scid_alias, pending_update_adds));
@@ -9942,7 +9927,7 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
99429927 },
99439928 None => {
99449929 debug_assert!(false, "Channel resumed without a funding txo, this should never happen!");
9945- return (htlc_forwards, decode_update_add_htlcs) ;
9930+ return decode_update_add_htlcs;
99469931 }
99479932 };
99489933 } else {
@@ -10030,7 +10015,7 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
1003010015 emit_initial_channel_ready_event!(pending_events, channel);
1003110016 }
1003210017
10033- (htlc_forwards, decode_update_add_htlcs)
10018+ decode_update_add_htlcs
1003410019 }
1003510020
1003610021 #[rustfmt::skip]
@@ -12114,12 +12099,11 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
1211412099 }
1211512100 }
1211612101 let need_lnd_workaround = chan.context.workaround_lnd_bug_4006.take();
12117- let (htlc_forwards, decode_update_add_htlcs) = self.handle_channel_resumption(
12102+ let decode_update_add_htlcs = self.handle_channel_resumption(
1211812103 &mut peer_state.pending_msg_events, chan, responses.raa, responses.commitment_update, responses.commitment_order,
12119- Vec::new(), Vec::new(), None, responses.channel_ready, responses.announcement_sigs,
12104+ Vec::new(), None, responses.channel_ready, responses.announcement_sigs,
1212012105 responses.tx_signatures, responses.tx_abort, responses.channel_ready_order,
1212112106 );
12122- debug_assert!(htlc_forwards.is_none());
1212312107 debug_assert!(decode_update_add_htlcs.is_none());
1212412108 if let Some(upd) = channel_update {
1212512109 peer_state.pending_msg_events.push(upd);
0 commit comments