]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Add variant for non-intro-nodes to BlindedFailure enum
authorValentine Wallace <vwallace@protonmail.com>
Thu, 26 Oct 2023 20:56:43 +0000 (16:56 -0400)
committerValentine Wallace <vwallace@protonmail.com>
Fri, 8 Dec 2023 19:33:40 +0000 (14:33 -0500)
For use in supporting receiving to multi-hop blinded paths.

lightning/src/ln/channelmanager.rs

index 42f901ac78df5c61b00e7b410e7c3ea6ac33b6b4..f1dae2747b49919b44de69022c1a08fa109126cf 100644 (file)
@@ -292,7 +292,7 @@ pub(super) enum HTLCForwardInfo {
 #[derive(Clone, Debug, Hash, PartialEq, Eq)]
 enum BlindedFailure {
        FromIntroductionNode,
-       // Another variant will be added here for non-intro nodes.
+       FromBlindedNode,
 }
 
 /// Tracks the inbound corresponding to an outbound HTLC
@@ -5243,6 +5243,7 @@ where
                                                        incoming_packet_shared_secret, phantom_shared_secret
                                                )
                                        },
+                                       Some(BlindedFailure::FromBlindedNode) => todo!(),
                                        None => {
                                                onion_error.get_encrypted_failure_packet(incoming_packet_shared_secret, phantom_shared_secret)
                                        }
@@ -9467,7 +9468,8 @@ impl_writeable_tlv_based_enum!(PendingHTLCStatus, ;
 );
 
 impl_writeable_tlv_based_enum!(BlindedFailure,
-       (0, FromIntroductionNode) => {}, ;
+       (0, FromIntroductionNode) => {},
+       (2, FromBlindedNode) => {}, ;
 );
 
 impl_writeable_tlv_based!(HTLCPreviousHopData, {