@@ -3298,7 +3298,7 @@ macro_rules! handle_monitor_update_completion {
3298
3298
}
3299
3299
$self.finalize_claims(updates.finalized_claimed_htlcs);
3300
3300
for failure in updates.failed_htlcs.drain(..) {
3301
- let receiver = HTLCHandlingType::NextHopChannel { node_id: Some(counterparty_node_id), channel_id };
3301
+ let receiver = HTLCHandlingType::ForwardFailed { node_id: Some(counterparty_node_id), channel_id };
3302
3302
$self.fail_htlc_backwards_internal(&failure.0, &failure.1, &failure.2, receiver);
3303
3303
}
3304
3304
} }
@@ -3924,7 +3924,7 @@ where
3924
3924
for htlc_source in failed_htlcs.drain(..) {
3925
3925
let failure_reason = LocalHTLCFailureReason::ChannelClosed;
3926
3926
let reason = HTLCFailReason::from_failure_code(failure_reason);
3927
- let receiver = HTLCHandlingType::NextHopChannel { node_id: Some(*counterparty_node_id), channel_id: *channel_id };
3927
+ let receiver = HTLCHandlingType::ForwardFailed { node_id: Some(*counterparty_node_id), channel_id: *channel_id };
3928
3928
self.fail_htlc_backwards_internal(&htlc_source.0, &htlc_source.1, &reason, receiver);
3929
3929
}
3930
3930
@@ -4048,7 +4048,7 @@ where
4048
4048
let (source, payment_hash, counterparty_node_id, channel_id) = htlc_source;
4049
4049
let failure_reason = LocalHTLCFailureReason::ChannelClosed;
4050
4050
let reason = HTLCFailReason::from_failure_code(failure_reason);
4051
- let receiver = HTLCHandlingType::NextHopChannel { node_id: Some(counterparty_node_id), channel_id };
4051
+ let receiver = HTLCHandlingType::ForwardFailed { node_id: Some(counterparty_node_id), channel_id };
4052
4052
self.fail_htlc_backwards_internal(&source, &payment_hash, &reason, receiver);
4053
4053
}
4054
4054
if let Some((_, funding_txo, _channel_id, monitor_update)) = shutdown_res.monitor_update {
@@ -5748,7 +5748,7 @@ where
5748
5748
if let Some(outgoing_scid) = outgoing_scid_opt {
5749
5749
match self.short_to_chan_info.read().unwrap().get(&outgoing_scid) {
5750
5750
Some((outgoing_counterparty_node_id, outgoing_channel_id)) =>
5751
- HTLCHandlingType::NextHopChannel {
5751
+ HTLCHandlingType::ForwardFailed {
5752
5752
node_id: Some(*outgoing_counterparty_node_id),
5753
5753
channel_id: *outgoing_channel_id,
5754
5754
},
@@ -6116,7 +6116,7 @@ where
6116
6116
let data = self.get_htlc_inbound_temp_fail_data(reason);
6117
6117
failed_forwards.push((htlc_source, payment_hash,
6118
6118
HTLCFailReason::reason(reason, data),
6119
- HTLCHandlingType::NextHopChannel { node_id: Some(chan.context.get_counterparty_node_id()), channel_id: forward_chan_id }
6119
+ HTLCHandlingType::ForwardFailed { node_id: Some(chan.context.get_counterparty_node_id()), channel_id: forward_chan_id }
6120
6120
));
6121
6121
} else {
6122
6122
forwarding_channel_not_found!(core::iter::once(forward_info).chain(draining_pending_forwards));
@@ -6969,7 +6969,7 @@ where
6969
6969
6970
6970
for (htlc_src, payment_hash) in htlcs_to_fail.drain(..) {
6971
6971
let reason = HTLCFailReason::reason(failure_reason, onion_failure_data.clone());
6972
- let receiver = HTLCHandlingType::NextHopChannel { node_id: Some(counterparty_node_id.clone()), channel_id };
6972
+ let receiver = HTLCHandlingType::ForwardFailed { node_id: Some(counterparty_node_id.clone()), channel_id };
6973
6973
self.fail_htlc_backwards_internal(&htlc_src, &payment_hash, &reason, receiver);
6974
6974
}
6975
6975
}
@@ -8755,7 +8755,7 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
8755
8755
}
8756
8756
}
8757
8757
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 };
8759
8759
let reason = HTLCFailReason::from_failure_code(LocalHTLCFailureReason::ChannelClosed);
8760
8760
self.fail_htlc_backwards_internal(&htlc_source.0, &htlc_source.1, &reason, receiver);
8761
8761
}
@@ -9613,7 +9613,7 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
9613
9613
} else {
9614
9614
log_trace!(logger, "Failing HTLC with hash {} from our monitor", &htlc_update.payment_hash);
9615
9615
let failure_reason = LocalHTLCFailureReason::OnChainTimeout;
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 };
9617
9617
let reason = HTLCFailReason::from_failure_code(failure_reason);
9618
9618
self.fail_htlc_backwards_internal(&htlc_update.source, &htlc_update.payment_hash, &reason, receiver);
9619
9619
}
@@ -11692,7 +11692,7 @@ where
11692
11692
let reason = LocalHTLCFailureReason::CLTVExpiryTooSoon;
11693
11693
let data = self.get_htlc_inbound_temp_fail_data(reason);
11694
11694
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() }));
11696
11696
}
11697
11697
let logger = WithChannelContext::from(&self.logger, &funded_channel.context, None);
11698
11698
if let Some(channel_ready) = channel_ready_opt {
@@ -14932,7 +14932,7 @@ where
14932
14932
for htlc_source in failed_htlcs.drain(..) {
14933
14933
let (source, payment_hash, counterparty_node_id, channel_id) = htlc_source;
14934
14934
let failure_reason = LocalHTLCFailureReason::ChannelClosed;
14935
- let receiver = HTLCHandlingType::NextHopChannel { node_id: Some(counterparty_node_id), channel_id };
14935
+ let receiver = HTLCHandlingType::ForwardFailed { node_id: Some(counterparty_node_id), channel_id };
14936
14936
let reason = HTLCFailReason::from_failure_code(failure_reason);
14937
14937
channel_manager.fail_htlc_backwards_internal(&source, &payment_hash, &reason, receiver);
14938
14938
}
0 commit comments