From 23b6465780de22a687e0039eb60a8cc50312eeef Mon Sep 17 00:00:00 2001 From: Sander van Grieken Date: Fri, 5 Dec 2025 17:14:17 +0100 Subject: [PATCH] onion_message: verify ONION_MESSAGE feature on peer before forwarding --- electrum/onion_message.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/electrum/onion_message.py b/electrum/onion_message.py index ffb430680..121235344 100644 --- a/electrum/onion_message.py +++ b/electrum/onion_message.py @@ -474,6 +474,10 @@ class OnionMessageManager(Logger): onion_packet_b = onion_packet.to_bytes() next_peer = self.lnwallet.peers.get(node_id) + if not next_peer.their_features.supports(LnFeatures.OPTION_ONION_MESSAGE_OPT): + self.logger.debug('forward dropped, next peer is not ONION_MESSAGE capable') + continue + next_peer.send_message( "onion_message", path_key=blinding,