File tree Expand file tree Collapse file tree 1 file changed +13
-6
lines changed
Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -210,13 +210,20 @@ async def handle_log_rx(event):
210210 pkt = bytes ().fromhex (event .payload ["payload" ])
211211
212212 if handle_log_rx .channel_echoes :
213- if pkt [0 ] == 0x15 :
213+ if pkt [0 ] & ~ 1 == 0x14 :
214214 chan_name = ""
215- path_len = pkt [1 ]
216- path = pkt [2 :path_len + 2 ].hex ()
217- chan_hash = pkt [path_len + 2 :path_len + 3 ].hex ()
218- cipher_mac = pkt [path_len + 3 :path_len + 5 ]
219- msg = pkt [path_len + 5 :]
215+ if pkt [0 ] & 1 : #no transport code
216+ path_len = pkt [1 ]
217+ path = pkt [2 :path_len + 2 ].hex ()
218+ path_end = path_len + 2
219+ else :
220+ path_len = pkt [5 ]
221+ path = pkt [6 :path_len + 6 ].hex ()
222+ path_end = path_len + 6
223+
224+ chan_hash = pkt [path_end :path_end + 1 ].hex ()
225+ cipher_mac = pkt [path_end + 1 :path_end + 3 ]
226+ msg = pkt [path_end + 3 :]
220227 channel = None
221228 for c in await get_channels (mc ):
222229 if c ["channel_hash" ] == chan_hash : # validate against MAC
You can’t perform that action at this time.
0 commit comments