Skip to content

Commit d92b0c7

Browse files
committed
onion_message: num_hops in blinded path is byte, not int.
1 parent c288656 commit d92b0c7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

electrum/onion_message.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ def create_blinded_path(
115115
blinded_path = {
116116
'first_node_id': introduction_point,
117117
'first_path_key': blinding,
118-
'num_hops': len(onionmsg_hops),
118+
'num_hops': bytes([len(onionmsg_hops)]),
119119
'path': onionmsg_hops
120120
}
121121

@@ -604,7 +604,7 @@ def _send_pending_message(self, key: bytes) -> None:
604604
path_id = self._path_id_from_payload_and_key(payload, key)
605605
reply_paths = get_blinded_reply_paths(self.lnwallet, path_id, max_paths=1)
606606
if not reply_paths:
607-
raise Exception(f'Could not create a reply_path for {key=}')
607+
raise Exception(f'Could not create a reply_path for {key=}. No active peers?')
608608

609609
final_payload['reply_path'] = {'path': reply_paths}
610610

0 commit comments

Comments
 (0)