mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-27 07:23:25 +00:00
channel blacklist: minor fix
This commit is contained in:
parent
fed6c96693
commit
a5570d94f3
1 changed files with 3 additions and 1 deletions
|
@ -998,6 +998,7 @@ class Peer(Logger):
|
||||||
message_type, payload = decode_msg(channel_update)
|
message_type, payload = decode_msg(channel_update)
|
||||||
payload['raw'] = channel_update
|
payload['raw'] = channel_update
|
||||||
orphaned, expired, deprecated, good, to_delete = self.channel_db.filter_channel_updates([payload])
|
orphaned, expired, deprecated, good, to_delete = self.channel_db.filter_channel_updates([payload])
|
||||||
|
blacklist = False
|
||||||
if good:
|
if good:
|
||||||
self.verify_channel_updates(good)
|
self.verify_channel_updates(good)
|
||||||
self.channel_db.update_policies(good, to_delete)
|
self.channel_db.update_policies(good, to_delete)
|
||||||
|
@ -1010,7 +1011,7 @@ class Peer(Logger):
|
||||||
elif expired:
|
elif expired:
|
||||||
blacklist = True
|
blacklist = True
|
||||||
elif deprecated:
|
elif deprecated:
|
||||||
self.logger.info(f'channel update is not more recent. blacklisting channel')
|
self.logger.info(f'channel update is not more recent.')
|
||||||
blacklist = True
|
blacklist = True
|
||||||
else:
|
else:
|
||||||
blacklist = True
|
blacklist = True
|
||||||
|
@ -1023,6 +1024,7 @@ class Peer(Logger):
|
||||||
except IndexError:
|
except IndexError:
|
||||||
self.logger.info("payment destination reported error")
|
self.logger.info("payment destination reported error")
|
||||||
else:
|
else:
|
||||||
|
self.logger.info(f'blacklisting channel {bh2u(short_chan_id)}')
|
||||||
self.network.path_finder.blacklist.add(short_chan_id)
|
self.network.path_finder.blacklist.add(short_chan_id)
|
||||||
|
|
||||||
def maybe_send_commitment(self, chan: Channel):
|
def maybe_send_commitment(self, chan: Channel):
|
||||||
|
|
Loading…
Add table
Reference in a new issue