@@ -3297,7 +3297,7 @@ macro_rules! handle_monitor_update_completion {
32973297 }
32983298 $self.finalize_claims(updates.finalized_claimed_htlcs);
32993299 for failure in updates.failed_htlcs.drain(..) {
3300- let receiver = HTLCHandlingType::NextHopChannel { node_id: Some(counterparty_node_id), channel_id };
3300+ let receiver = HTLCHandlingType::ForwardFailed { node_id: Some(counterparty_node_id), channel_id };
33013301 $self.fail_htlc_backwards_internal(&failure.0, &failure.1, &failure.2, receiver);
33023302 }
33033303 } }
@@ -3923,7 +3923,7 @@ where
39233923 for htlc_source in failed_htlcs.drain(..) {
39243924 let failure_reason = LocalHTLCFailureReason::DroppedPending;
39253925 let reason = HTLCFailReason::from_failure_code(failure_reason);
3926- let receiver = HTLCHandlingType::NextHopChannel { node_id: Some(*counterparty_node_id), channel_id: *channel_id };
3926+ let receiver = HTLCHandlingType::ForwardFailed { node_id: Some(*counterparty_node_id), channel_id: *channel_id };
39273927 self.fail_htlc_backwards_internal(&htlc_source.0, &htlc_source.1, &reason, receiver);
39283928 }
39293929
@@ -4047,7 +4047,7 @@ where
40474047 let (source, payment_hash, counterparty_node_id, channel_id) = htlc_source;
40484048 let failure_reason = LocalHTLCFailureReason::DroppedPending;
40494049 let reason = HTLCFailReason::from_failure_code(failure_reason);
4050- let receiver = HTLCHandlingType::NextHopChannel { node_id: Some(counterparty_node_id), channel_id };
4050+ let receiver = HTLCHandlingType::ForwardFailed { node_id: Some(counterparty_node_id), channel_id };
40514051 self.fail_htlc_backwards_internal(&source, &payment_hash, &reason, receiver);
40524052 }
40534053 if let Some((_, funding_txo, _channel_id, monitor_update)) = shutdown_res.monitor_update {
@@ -5745,7 +5745,7 @@ where
57455745 if let Some(outgoing_scid) = outgoing_scid_opt {
57465746 match self.short_to_chan_info.read().unwrap().get(&outgoing_scid) {
57475747 Some((outgoing_counterparty_node_id, outgoing_channel_id)) =>
5748- HTLCHandlingType::NextHopChannel {
5748+ HTLCHandlingType::ForwardFailed {
57495749 node_id: Some(*outgoing_counterparty_node_id),
57505750 channel_id: *outgoing_channel_id,
57515751 },
@@ -6112,7 +6112,7 @@ where
61126112 let data = self.get_htlc_inbound_temp_fail_data(reason);
61136113 failed_forwards.push((htlc_source, payment_hash,
61146114 HTLCFailReason::reason(reason, data),
6115- HTLCHandlingType::NextHopChannel { node_id: Some(chan.context.get_counterparty_node_id()), channel_id: forward_chan_id }
6115+ HTLCHandlingType::ForwardFailed { node_id: Some(chan.context.get_counterparty_node_id()), channel_id: forward_chan_id }
61166116 ));
61176117 } else {
61186118 forwarding_channel_not_found!(core::iter::once(forward_info).chain(draining_pending_forwards));
@@ -6968,7 +6968,7 @@ where
69686968
69696969 for (htlc_src, payment_hash) in htlcs_to_fail.drain(..) {
69706970 let reason = HTLCFailReason::reason(failure_reason, onion_failure_data.clone());
6971- let receiver = HTLCHandlingType::NextHopChannel { node_id: Some(counterparty_node_id.clone()), channel_id };
6971+ let receiver = HTLCHandlingType::ForwardFailed { node_id: Some(counterparty_node_id.clone()), channel_id };
69726972 self.fail_htlc_backwards_internal(&htlc_src, &payment_hash, &reason, receiver);
69736973 }
69746974 }
@@ -8755,7 +8755,7 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
87558755 }
87568756 }
87578757 for htlc_source in dropped_htlcs.drain(..) {
8758- let receiver = HTLCHandlingType::NextHopChannel { node_id: Some(counterparty_node_id.clone()), channel_id: msg.channel_id };
8758+ let receiver = HTLCHandlingType::ForwardFailed { node_id: Some(counterparty_node_id.clone()), channel_id: msg.channel_id };
87598759 let reason = HTLCFailReason::from_failure_code(LocalHTLCFailureReason::DroppedPending);
87608760 self.fail_htlc_backwards_internal(&htlc_source.0, &htlc_source.1, &reason, receiver);
87618761 }
@@ -9613,7 +9613,7 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
96139613 } else {
96149614 log_trace!(logger, "Failing HTLC with hash {} from our monitor", &htlc_update.payment_hash);
96159615 let failure_reason = LocalHTLCFailureReason::ChannelClosed;
9616- let receiver = HTLCHandlingType::NextHopChannel { node_id: Some(counterparty_node_id), channel_id };
9616+ let receiver = HTLCHandlingType::ForwardFailed { node_id: Some(counterparty_node_id), channel_id };
96179617 let reason = HTLCFailReason::from_failure_code(failure_reason);
96189618 self.fail_htlc_backwards_internal(&htlc_update.source, &htlc_update.payment_hash, &reason, receiver);
96199619 }
@@ -11692,7 +11692,7 @@ where
1169211692 let reason = LocalHTLCFailureReason::CLTVExpiryTooSoon;
1169311693 let data = self.get_htlc_inbound_temp_fail_data(reason);
1169411694 timed_out_htlcs.push((source, payment_hash, HTLCFailReason::reason(reason, data),
11695- HTLCHandlingType::NextHopChannel { node_id: Some(funded_channel.context.get_counterparty_node_id()), channel_id: funded_channel.context.channel_id() }));
11695+ HTLCHandlingType::ForwardFailed { node_id: Some(funded_channel.context.get_counterparty_node_id()), channel_id: funded_channel.context.channel_id() }));
1169611696 }
1169711697 let logger = WithChannelContext::from(&self.logger, &funded_channel.context, None);
1169811698 if let Some(channel_ready) = channel_ready_opt {
@@ -14934,7 +14934,7 @@ where
1493414934 for htlc_source in failed_htlcs.drain(..) {
1493514935 let (source, payment_hash, counterparty_node_id, channel_id) = htlc_source;
1493614936 let failure_reason = LocalHTLCFailureReason::DroppedPending;
14937- let receiver = HTLCHandlingType::NextHopChannel { node_id: Some(counterparty_node_id), channel_id };
14937+ let receiver = HTLCHandlingType::ForwardFailed { node_id: Some(counterparty_node_id), channel_id };
1493814938 let reason = HTLCFailReason::from_failure_code(failure_reason);
1493914939 channel_manager.fail_htlc_backwards_internal(&source, &payment_hash, &reason, receiver);
1494014940 }
0 commit comments