X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;ds=sidebyside;f=lightning%2Fsrc%2Fln%2Fonion_utils.rs;fp=lightning%2Fsrc%2Fln%2Fonion_utils.rs;h=249d094f61d6ad1e0eb4b9e5ef17ed076d18e9b3;hb=9cc0e9816aa979d83a35f42fd788a7fa03abbf74;hp=74de4a923577269bedce2a4dccb1821d307f76b6;hpb=6159325ee7022508ddd3c4178ba0fe3fe630fc8e;p=rust-lightning diff --git a/lightning/src/ln/onion_utils.rs b/lightning/src/ln/onion_utils.rs index 74de4a92..249d094f 100644 --- a/lightning/src/ln/onion_utils.rs +++ b/lightning/src/ln/onion_utils.rs @@ -1072,6 +1072,21 @@ pub(crate) enum Hop { }, } +impl Hop { + pub(crate) fn is_intro_node_blinded_forward(&self) -> bool { + match self { + Self::Forward { + next_hop_data: + msgs::InboundOnionPayload::BlindedForward { + intro_node_blinding_point: Some(_), .. + }, + .. + } => true, + _ => false, + } + } +} + /// Error returned when we fail to decode the onion packet. #[derive(Debug)] pub(crate) enum OnionDecodeErr {