X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Fonion_message%2Fmessenger.rs;h=dbfa0bc636a3de78ac0cdf5f87ab6f31960583c8;hb=cff88aa5097ca09cfbd869eea9b24f61e6977b2f;hp=865700609450380ad2314d8f26b36cb6401bc0c1;hpb=7533a3c42fea0ba08494b617a4f872dd04ef7f1e;p=rust-lightning diff --git a/lightning/src/onion_message/messenger.rs b/lightning/src/onion_message/messenger.rs index 86570060..dbfa0bc6 100644 --- a/lightning/src/onion_message/messenger.rs +++ b/lightning/src/onion_message/messenger.rs @@ -216,8 +216,8 @@ impl OnionMessenger return Err(SendError::TooFewBlindedHops); } } - let OnionMessageContents::Custom(ref msg) = message; - if msg.tlv_type() < 64 { return Err(SendError::InvalidMessage) } + + if message.tlv_type() < 64 { return Err(SendError::InvalidMessage) } // If we are sending straight to a blinded path and we are the introduction node, we need to // advance the blinded path by 1 hop so the second hop is the new introduction node. @@ -342,6 +342,7 @@ impl OnionMessageHandler for OnionMe "Received an onion message with path_id {:02x?} and {} reply_path", path_id, if reply_path.is_some() { "a" } else { "no" }); match message { + OnionMessageContents::Offers(_msg) => todo!(), OnionMessageContents::Custom(msg) => self.custom_handler.handle_custom_message(msg), } },