@@ -3299,7 +3299,7 @@ macro_rules! handle_monitor_update_completion {
32993299 }
33003300 $self.finalize_claims(updates.finalized_claimed_htlcs);
33013301 for failure in updates.failed_htlcs.drain(..) {
3302- let receiver = HTLCHandlingType::NextHopChannel { node_id: Some(counterparty_node_id), channel_id };
3302+ let receiver = HTLCHandlingType::ForwardFailed { node_id: Some(counterparty_node_id), channel_id };
33033303 $self.fail_htlc_backwards_internal(&failure.0, &failure.1, &failure.2, receiver);
33043304 }
33053305 } }
@@ -3925,7 +3925,7 @@ where
39253925 for htlc_source in failed_htlcs.drain(..) {
39263926 let failure_reason = LocalHTLCFailureReason::ChannelClosed;
39273927 let reason = HTLCFailReason::from_failure_code(failure_reason);
3928- let receiver = HTLCHandlingType::NextHopChannel { node_id: Some(*counterparty_node_id), channel_id: *channel_id };
3928+ let receiver = HTLCHandlingType::ForwardFailed { node_id: Some(*counterparty_node_id), channel_id: *channel_id };
39293929 self.fail_htlc_backwards_internal(&htlc_source.0, &htlc_source.1, &reason, receiver);
39303930 }
39313931
@@ -4049,7 +4049,7 @@ where
40494049 let (source, payment_hash, counterparty_node_id, channel_id) = htlc_source;
40504050 let failure_reason = LocalHTLCFailureReason::ChannelClosed;
40514051 let reason = HTLCFailReason::from_failure_code(failure_reason);
4052- let receiver = HTLCHandlingType::NextHopChannel { node_id: Some(counterparty_node_id), channel_id };
4052+ let receiver = HTLCHandlingType::ForwardFailed { node_id: Some(counterparty_node_id), channel_id };
40534053 self.fail_htlc_backwards_internal(&source, &payment_hash, &reason, receiver);
40544054 }
40554055 if let Some((_, funding_txo, _channel_id, monitor_update)) = shutdown_res.monitor_update {
@@ -5749,7 +5749,7 @@ where
57495749 if let Some(outgoing_scid) = outgoing_scid_opt {
57505750 match self.short_to_chan_info.read().unwrap().get(&outgoing_scid) {
57515751 Some((outgoing_counterparty_node_id, outgoing_channel_id)) =>
5752- HTLCHandlingType::NextHopChannel {
5752+ HTLCHandlingType::ForwardFailed {
57535753 node_id: Some(*outgoing_counterparty_node_id),
57545754 channel_id: *outgoing_channel_id,
57555755 },
@@ -6117,7 +6117,7 @@ where
61176117 let data = self.get_htlc_inbound_temp_fail_data(reason);
61186118 failed_forwards.push((htlc_source, payment_hash,
61196119 HTLCFailReason::reason(reason, data),
6120- HTLCHandlingType::NextHopChannel { node_id: Some(chan.context.get_counterparty_node_id()), channel_id: forward_chan_id }
6120+ HTLCHandlingType::ForwardFailed { node_id: Some(chan.context.get_counterparty_node_id()), channel_id: forward_chan_id }
61216121 ));
61226122 } else {
61236123 forwarding_channel_not_found!(core::iter::once(forward_info).chain(draining_pending_forwards));
@@ -6970,7 +6970,7 @@ where
69706970
69716971 for (htlc_src, payment_hash) in htlcs_to_fail.drain(..) {
69726972 let reason = HTLCFailReason::reason(failure_reason, onion_failure_data.clone());
6973- let receiver = HTLCHandlingType::NextHopChannel { node_id: Some(counterparty_node_id.clone()), channel_id };
6973+ let receiver = HTLCHandlingType::ForwardFailed { node_id: Some(counterparty_node_id.clone()), channel_id };
69746974 self.fail_htlc_backwards_internal(&htlc_src, &payment_hash, &reason, receiver);
69756975 }
69766976 }
@@ -8756,7 +8756,7 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
87568756 }
87578757 }
87588758 for htlc_source in dropped_htlcs.drain(..) {
8759- let receiver = HTLCHandlingType::NextHopChannel { node_id: Some(counterparty_node_id.clone()), channel_id: msg.channel_id };
8759+ let receiver = HTLCHandlingType::ForwardFailed { node_id: Some(counterparty_node_id.clone()), channel_id: msg.channel_id };
87608760 let reason = HTLCFailReason::from_failure_code(LocalHTLCFailureReason::ChannelClosed);
87618761 self.fail_htlc_backwards_internal(&htlc_source.0, &htlc_source.1, &reason, receiver);
87628762 }
@@ -9614,7 +9614,7 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
96149614 } else {
96159615 log_trace!(logger, "Failing HTLC with hash {} from our monitor", &htlc_update.payment_hash);
96169616 let failure_reason = LocalHTLCFailureReason::OnChainTimeout;
9617- let receiver = HTLCHandlingType::NextHopChannel { node_id: Some(counterparty_node_id), channel_id };
9617+ let receiver = HTLCHandlingType::ForwardFailed { node_id: Some(counterparty_node_id), channel_id };
96189618 let reason = HTLCFailReason::from_failure_code(failure_reason);
96199619 self.fail_htlc_backwards_internal(&htlc_update.source, &htlc_update.payment_hash, &reason, receiver);
96209620 }
@@ -11693,7 +11693,7 @@ where
1169311693 let reason = LocalHTLCFailureReason::CLTVExpiryTooSoon;
1169411694 let data = self.get_htlc_inbound_temp_fail_data(reason);
1169511695 timed_out_htlcs.push((source, payment_hash, HTLCFailReason::reason(reason, data),
11696- HTLCHandlingType::NextHopChannel { node_id: Some(funded_channel.context.get_counterparty_node_id()), channel_id: funded_channel.context.channel_id() }));
11696+ HTLCHandlingType::ForwardFailed { node_id: Some(funded_channel.context.get_counterparty_node_id()), channel_id: funded_channel.context.channel_id() }));
1169711697 }
1169811698 let logger = WithChannelContext::from(&self.logger, &funded_channel.context, None);
1169911699 if let Some(channel_ready) = channel_ready_opt {
@@ -14933,7 +14933,7 @@ where
1493314933 for htlc_source in failed_htlcs.drain(..) {
1493414934 let (source, payment_hash, counterparty_node_id, channel_id) = htlc_source;
1493514935 let failure_reason = LocalHTLCFailureReason::ChannelClosed;
14936- let receiver = HTLCHandlingType::NextHopChannel { node_id: Some(counterparty_node_id), channel_id };
14936+ let receiver = HTLCHandlingType::ForwardFailed { node_id: Some(counterparty_node_id), channel_id };
1493714937 let reason = HTLCFailReason::from_failure_code(failure_reason);
1493814938 channel_manager.fail_htlc_backwards_internal(&source, &payment_hash, &reason, receiver);
1493914939 }
0 commit comments