@@ -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,
@@ -9571,7 +9569,6 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
95719569 &self, channel_id: ChannelId, counterparty_node_id: PublicKey,
95729570 unbroadcasted_batch_funding_txid: Option<Txid>,
95739571 update_actions: Vec<MonitorUpdateCompletionAction>,
9574- htlc_forwards: Option<PerSourcePendingForward>,
95759572 decode_update_add_htlcs: Option<(u64, Vec<msgs::UpdateAddHTLC>)>,
95769573 finalized_claimed_htlcs: Vec<(HTLCSource, Option<AttributionData>)>,
95779574 failed_htlcs: Vec<(HTLCSource, PaymentHash, HTLCFailReason)>,
@@ -9627,9 +9624,6 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
96279624
96289625 self.handle_monitor_update_completion_actions(update_actions);
96299626
9630- if let Some(forwards) = htlc_forwards {
9631- self.forward_htlcs(&mut [forwards][..]);
9632- }
96339627 if let Some(decode) = decode_update_add_htlcs {
96349628 self.push_decode_update_add_htlcs(decode);
96359629 }
@@ -9830,17 +9824,16 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
98309824 fn handle_channel_resumption(&self, pending_msg_events: &mut Vec<MessageSendEvent>,
98319825 channel: &mut FundedChannel<SP>, raa: Option<msgs::RevokeAndACK>,
98329826 commitment_update: Option<msgs::CommitmentUpdate>, commitment_order: RAACommitmentOrder,
9833- pending_forwards: Vec<(PendingHTLCInfo, u64)>, pending_update_adds: Vec<msgs::UpdateAddHTLC>,
9834- funding_broadcastable: Option<Transaction>,
9827+ pending_update_adds: Vec<msgs::UpdateAddHTLC>, funding_broadcastable: Option<Transaction>,
98359828 channel_ready: Option<msgs::ChannelReady>, announcement_sigs: Option<msgs::AnnouncementSignatures>,
98369829 tx_signatures: Option<msgs::TxSignatures>, tx_abort: Option<msgs::TxAbort>,
98379830 channel_ready_order: ChannelReadyOrder,
9838- ) -> ( Option<(u64, PublicKey, OutPoint, ChannelId, u128, Vec<(PendingHTLCInfo, u64)>)>, Option<(u64, Vec< msgs::UpdateAddHTLC>)>) {
9831+ ) -> Option<(u64, Vec<msgs::UpdateAddHTLC>)> {
98399832 let logger = WithChannelContext::from(&self.logger, &channel.context, None);
9840- 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",
9833+ log_trace!(logger, "Handling channel resumption with {} RAA, {} commitment update, {} pending update_add_htlcs, {}broadcasting funding, {} channel ready, {} announcement, {} tx_signatures, {} tx_abort",
98419834 if raa.is_some() { "an" } else { "no" },
98429835 if commitment_update.is_some() { "a" } else { "no" },
9843- pending_forwards.len(), pending_update_adds.len(),
9836+ pending_update_adds.len(),
98449837 if funding_broadcastable.is_some() { "" } else { "not " },
98459838 if channel_ready.is_some() { "sending" } else { "without" },
98469839 if announcement_sigs.is_some() { "sending" } else { "without" },
@@ -9851,14 +9844,6 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
98519844 let counterparty_node_id = channel.context.get_counterparty_node_id();
98529845 let outbound_scid_alias = channel.context.outbound_scid_alias();
98539846
9854- let mut htlc_forwards = None;
9855- if !pending_forwards.is_empty() {
9856- htlc_forwards = Some((
9857- outbound_scid_alias, channel.context.get_counterparty_node_id(),
9858- channel.funding.get_funding_txo().unwrap(), channel.context.channel_id(),
9859- channel.context.get_user_id(), pending_forwards
9860- ));
9861- }
98629847 let mut decode_update_add_htlcs = None;
98639848 if !pending_update_adds.is_empty() {
98649849 decode_update_add_htlcs = Some((outbound_scid_alias, pending_update_adds));
@@ -9946,7 +9931,7 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
99469931 },
99479932 None => {
99489933 debug_assert!(false, "Channel resumed without a funding txo, this should never happen!");
9949- return (htlc_forwards, decode_update_add_htlcs) ;
9934+ return decode_update_add_htlcs;
99509935 }
99519936 };
99529937 } else {
@@ -10034,7 +10019,7 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
1003410019 emit_initial_channel_ready_event!(pending_events, channel);
1003510020 }
1003610021
10037- (htlc_forwards, decode_update_add_htlcs)
10022+ decode_update_add_htlcs
1003810023 }
1003910024
1004010025 #[rustfmt::skip]
@@ -12113,12 +12098,11 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
1211312098 }
1211412099 }
1211512100 let need_lnd_workaround = chan.context.workaround_lnd_bug_4006.take();
12116- let (htlc_forwards, decode_update_add_htlcs) = self.handle_channel_resumption(
12101+ let decode_update_add_htlcs = self.handle_channel_resumption(
1211712102 &mut peer_state.pending_msg_events, chan, responses.raa, responses.commitment_update, responses.commitment_order,
12118- Vec::new(), Vec::new(), None, responses.channel_ready, responses.announcement_sigs,
12103+ Vec::new(), None, responses.channel_ready, responses.announcement_sigs,
1211912104 responses.tx_signatures, responses.tx_abort, responses.channel_ready_order,
1212012105 );
12121- debug_assert!(htlc_forwards.is_none());
1212212106 debug_assert!(decode_update_add_htlcs.is_none());
1212312107 if let Some(upd) = channel_update {
1212412108 peer_state.pending_msg_events.push(upd);
0 commit comments