From d92b0c74a3a4467e8e54ca60146e8f1711aa1513 Mon Sep 17 00:00:00 2001 From: Sander van Grieken Date: Fri, 21 Nov 2025 17:10:23 +0100 Subject: [PATCH] onion_message: num_hops in blinded path is byte, not int. --- electrum/onion_message.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/electrum/onion_message.py b/electrum/onion_message.py index 755e9de79..29eef9215 100644 --- a/electrum/onion_message.py +++ b/electrum/onion_message.py @@ -115,7 +115,7 @@ def create_blinded_path( blinded_path = { 'first_node_id': introduction_point, 'first_path_key': blinding, - 'num_hops': len(onionmsg_hops), + 'num_hops': bytes([len(onionmsg_hops)]), 'path': onionmsg_hops } @@ -604,7 +604,7 @@ class OnionMessageManager(Logger): path_id = self._path_id_from_payload_and_key(payload, key) reply_paths = get_blinded_reply_paths(self.lnwallet, path_id, max_paths=1) if not reply_paths: - raise Exception(f'Could not create a reply_path for {key=}') + raise Exception(f'Could not create a reply_path for {key=}. No active peers?') final_payload['reply_path'] = {'path': reply_paths}