lnchannel: verify sig of remote chanupd (for inc edge of direct chan)
This is re the channel update for the incoming direction of our own channels. This message can only come from the counterparty itself so maybe the sig check is redundant... but for sanity I think we should check it anyway.
This commit is contained in:
@@ -1284,10 +1284,11 @@ class LNWallet(LNWorker):
|
||||
short_channel_id = ShortChannelID(payload['short_channel_id'])
|
||||
if r == UpdateStatus.GOOD:
|
||||
self.logger.info(f"applied channel update to {short_channel_id}")
|
||||
# TODO: test this
|
||||
# TODO: add test for this
|
||||
# FIXME: this does not work for our own unannounced channels.
|
||||
for chan in self.channels.values():
|
||||
if chan.short_channel_id == short_channel_id:
|
||||
chan.set_remote_update(payload['raw'])
|
||||
chan.set_remote_update(payload)
|
||||
update = True
|
||||
elif r == UpdateStatus.ORPHANED:
|
||||
# maybe it is a private channel (and data in invoice was outdated)
|
||||
|
||||
Reference in New Issue
Block a user