Browse Source
fix verify_sig_for_channel_update: use raw message
regtest_lnd
ThomasV
6 years ago
committed by
SomberNight
No known key found for this signature in database
GPG Key ID: B33B5F232C6271E9
2 changed files with
2 additions and
2 deletions
-
electrum/lnpeer.py
-
electrum/lnverifier.py
|
|
@ -118,7 +118,7 @@ class Peer(PrintError): |
|
|
|
#self.print_error("Received '%s'" % message_type.upper(), payload) |
|
|
|
return |
|
|
|
# raw message is needed to check signature |
|
|
|
if message_type=='node_announcement': |
|
|
|
if message_type in ['node_announcement', 'channel_update']: |
|
|
|
payload['raw'] = message |
|
|
|
execution_result = f(payload) |
|
|
|
if asyncio.iscoroutinefunction(f): |
|
|
|
|
|
@ -194,7 +194,7 @@ def verify_sigs_for_channel_announcement(msg_bytes: bytes) -> bool: |
|
|
|
|
|
|
|
|
|
|
|
def verify_sig_for_channel_update(chan_upd: dict, node_id: bytes) -> bool: |
|
|
|
msg_bytes = encode_msg('channel_update', **chan_upd) |
|
|
|
msg_bytes = chan_upd['raw'] |
|
|
|
pre_hash = msg_bytes[2+64:] |
|
|
|
h = sha256d(pre_hash) |
|
|
|
sig = chan_upd['signature'] |
|
|
|