Skip to content

Commit 23b6465

Browse files
committed
onion_message: verify ONION_MESSAGE feature on peer before forwarding
1 parent fb58d21 commit 23b6465

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

electrum/onion_message.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -474,6 +474,10 @@ async def process_forward_queue(self) -> None:
474474
onion_packet_b = onion_packet.to_bytes()
475475
next_peer = self.lnwallet.peers.get(node_id)
476476

477+
if not next_peer.their_features.supports(LnFeatures.OPTION_ONION_MESSAGE_OPT):
478+
self.logger.debug('forward dropped, next peer is not ONION_MESSAGE capable')
479+
continue
480+
477481
next_peer.send_message(
478482
"onion_message",
479483
path_key=blinding,

0 commit comments

Comments
 (0)