Skip to content

Commit 50d940b

Browse files
Complete remaining TODOs for failing blinded non-intro forwards.
1 parent 309d746 commit 50d940b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lightning/src/ln/channelmanager.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -209,9 +209,8 @@ pub struct BlindedForward {
209209
impl PendingHTLCRouting {
210210
// Used to override the onion failure code and data if the HTLC is blinded.
211211
fn blinded_failure(&self) -> Option<BlindedFailure> {
212-
// TODO: needs update when we support forwarding blinded HTLCs as non-intro node
213212
match self {
214-
Self::Forward { blinded: Some(_), .. } => Some(BlindedFailure::FromIntroductionNode),
213+
Self::Forward { blinded: Some(BlindedForward { failure, .. }), .. } => Some(*failure),
215214
Self::Receive { requires_blinded_error: true, .. } => Some(BlindedFailure::FromBlindedNode),
216215
_ => None,
217216
}
@@ -3042,8 +3041,9 @@ where
30423041

30433042
let is_intro_node_forward = match next_hop {
30443043
onion_utils::Hop::Forward {
3045-
// TODO: update this when we support blinded forwarding as non-intro node
3046-
next_hop_data: msgs::InboundOnionPayload::BlindedForward { .. }, ..
3044+
next_hop_data: msgs::InboundOnionPayload::BlindedForward {
3045+
intro_node_blinding_point: Some(_), ..
3046+
}, ..
30473047
} => true,
30483048
_ => false,
30493049
};
@@ -4377,7 +4377,7 @@ where
43774377
incoming_packet_shared_secret: incoming_shared_secret,
43784378
// Phantom payments are only PendingHTLCRouting::Receive.
43794379
phantom_shared_secret: None,
4380-
blinded_failure: blinded.map(|_| BlindedFailure::FromIntroductionNode),
4380+
blinded_failure: blinded.map(|b| b.failure),
43814381
});
43824382
let next_blinding_point = blinded.and_then(|b| {
43834383
let encrypted_tlvs_ss = self.node_signer.ecdh(

0 commit comments

Comments
 (0)