@@ -3335,13 +3335,12 @@ macro_rules! handle_monitor_update_completion {
33353335 None
33363336 };
33373337
3338- let (htlc_forwards, decode_update_add_htlcs) = $self.handle_channel_resumption(
3338+ let decode_update_add_htlcs = $self.handle_channel_resumption(
33393339 &mut $peer_state.pending_msg_events,
33403340 $chan,
33413341 updates.raa,
33423342 updates.commitment_update,
33433343 updates.commitment_order,
3344- updates.accepted_htlcs,
33453344 updates.pending_update_adds,
33463345 updates.funding_broadcastable,
33473346 updates.channel_ready,
@@ -3364,7 +3363,6 @@ macro_rules! handle_monitor_update_completion {
33643363 cp_node_id,
33653364 unbroadcasted_batch_funding_txid,
33663365 update_actions,
3367- htlc_forwards,
33683366 decode_update_add_htlcs,
33693367 updates.finalized_claimed_htlcs,
33703368 updates.failed_htlcs,
@@ -9569,7 +9567,6 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
95699567 &self, channel_id: ChannelId, counterparty_node_id: PublicKey,
95709568 unbroadcasted_batch_funding_txid: Option<Txid>,
95719569 update_actions: Vec<MonitorUpdateCompletionAction>,
9572- htlc_forwards: Option<PerSourcePendingForward>,
95739570 decode_update_add_htlcs: Option<(u64, Vec<msgs::UpdateAddHTLC>)>,
95749571 finalized_claimed_htlcs: Vec<(HTLCSource, Option<AttributionData>)>,
95759572 failed_htlcs: Vec<(HTLCSource, PaymentHash, HTLCFailReason)>,
@@ -9625,9 +9622,6 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
96259622
96269623 self.handle_monitor_update_completion_actions(update_actions);
96279624
9628- if let Some(forwards) = htlc_forwards {
9629- self.forward_htlcs(&mut [forwards][..]);
9630- }
96319625 if let Some(decode) = decode_update_add_htlcs {
96329626 self.push_decode_update_add_htlcs(decode);
96339627 }
@@ -9840,17 +9834,16 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
98409834 fn handle_channel_resumption(&self, pending_msg_events: &mut Vec<MessageSendEvent>,
98419835 channel: &mut FundedChannel<SP>, raa: Option<msgs::RevokeAndACK>,
98429836 commitment_update: Option<msgs::CommitmentUpdate>, commitment_order: RAACommitmentOrder,
9843- pending_forwards: Vec<(PendingHTLCInfo, u64)>, pending_update_adds: Vec<msgs::UpdateAddHTLC>,
9844- funding_broadcastable: Option<Transaction>,
9837+ pending_update_adds: Vec<msgs::UpdateAddHTLC>, funding_broadcastable: Option<Transaction>,
98459838 channel_ready: Option<msgs::ChannelReady>, announcement_sigs: Option<msgs::AnnouncementSignatures>,
98469839 tx_signatures: Option<msgs::TxSignatures>, tx_abort: Option<msgs::TxAbort>,
98479840 channel_ready_order: ChannelReadyOrder,
9848- ) -> ( Option<(u64, PublicKey, OutPoint, ChannelId, u128, Vec<(PendingHTLCInfo, u64)>)>, Option<(u64, Vec< msgs::UpdateAddHTLC>)>) {
9841+ ) -> Option<(u64, Vec<msgs::UpdateAddHTLC>)> {
98499842 let logger = WithChannelContext::from(&self.logger, &channel.context, None);
9850- 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",
9843+ log_trace!(logger, "Handling channel resumption with {} RAA, {} commitment update, {} pending update_add_htlcs, {}broadcasting funding, {} channel ready, {} announcement, {} tx_signatures, {} tx_abort",
98519844 if raa.is_some() { "an" } else { "no" },
98529845 if commitment_update.is_some() { "a" } else { "no" },
9853- pending_forwards.len(), pending_update_adds.len(),
9846+ pending_update_adds.len(),
98549847 if funding_broadcastable.is_some() { "" } else { "not " },
98559848 if channel_ready.is_some() { "sending" } else { "without" },
98569849 if announcement_sigs.is_some() { "sending" } else { "without" },
@@ -9861,14 +9854,6 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
98619854 let counterparty_node_id = channel.context.get_counterparty_node_id();
98629855 let outbound_scid_alias = channel.context.outbound_scid_alias();
98639856
9864- let mut htlc_forwards = None;
9865- if !pending_forwards.is_empty() {
9866- htlc_forwards = Some((
9867- outbound_scid_alias, channel.context.get_counterparty_node_id(),
9868- channel.funding.get_funding_txo().unwrap(), channel.context.channel_id(),
9869- channel.context.get_user_id(), pending_forwards
9870- ));
9871- }
98729857 let mut decode_update_add_htlcs = None;
98739858 if !pending_update_adds.is_empty() {
98749859 decode_update_add_htlcs = Some((outbound_scid_alias, pending_update_adds));
@@ -9956,7 +9941,7 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
99569941 },
99579942 None => {
99589943 debug_assert!(false, "Channel resumed without a funding txo, this should never happen!");
9959- return (htlc_forwards, decode_update_add_htlcs) ;
9944+ return decode_update_add_htlcs;
99609945 }
99619946 };
99629947 } else {
@@ -10044,7 +10029,7 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
1004410029 emit_initial_channel_ready_event!(pending_events, channel);
1004510030 }
1004610031
10047- (htlc_forwards, decode_update_add_htlcs)
10032+ decode_update_add_htlcs
1004810033 }
1004910034
1005010035 #[rustfmt::skip]
@@ -12128,12 +12113,11 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
1212812113 }
1212912114 }
1213012115 let need_lnd_workaround = chan.context.workaround_lnd_bug_4006.take();
12131- let (htlc_forwards, decode_update_add_htlcs) = self.handle_channel_resumption(
12116+ let decode_update_add_htlcs = self.handle_channel_resumption(
1213212117 &mut peer_state.pending_msg_events, chan, responses.raa, responses.commitment_update, responses.commitment_order,
12133- Vec::new(), Vec::new(), None, responses.channel_ready, responses.announcement_sigs,
12118+ Vec::new(), None, responses.channel_ready, responses.announcement_sigs,
1213412119 responses.tx_signatures, responses.tx_abort, responses.channel_ready_order,
1213512120 );
12136- debug_assert!(htlc_forwards.is_none());
1213712121 debug_assert!(decode_update_add_htlcs.is_none());
1213812122 if let Some(upd) = channel_update {
1213912123 peer_state.pending_msg_events.push(upd);
0 commit comments