mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-31 17:31:36 +00:00
lnrouter: ignore duplicate channel announcement
This commit is contained in:
parent
9897e41e68
commit
12a02a8a1e
1 changed files with 3 additions and 0 deletions
|
@ -114,6 +114,9 @@ class ChannelDB(PrintError):
|
|||
short_channel_id = msg_payload['short_channel_id']
|
||||
#self.print_error('channel announcement', binascii.hexlify(short_channel_id).decode("ascii"))
|
||||
channel_info = ChannelInfo(msg_payload)
|
||||
if short_channel_id in self._id_to_channel_info:
|
||||
self.print_error("IGNORING CHANNEL ANNOUNCEMENT, WE ALREADY KNOW THIS CHANNEL")
|
||||
return
|
||||
self._id_to_channel_info[short_channel_id] = channel_info
|
||||
self._channels_for_node[channel_info.node_id_1].add(short_channel_id)
|
||||
self._channels_for_node[channel_info.node_id_2].add(short_channel_id)
|
||||
|
|
Loading…
Add table
Reference in a new issue