mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-23 17:47:31 +00:00
follow-up prev
This commit is contained in:
parent
0fbbc7b060
commit
bcb7da938d
1 changed files with 6 additions and 3 deletions
|
@ -158,15 +158,18 @@ class LNChannelVerifier(NetworkJobOnDefaultServer):
|
||||||
if expected_address != actual_output.address:
|
if expected_address != actual_output.address:
|
||||||
# FIXME what now? best would be to ban the originating ln peer.
|
# FIXME what now? best would be to ban the originating ln peer.
|
||||||
self.print_error(f"funding output script mismatch for {bh2u(short_channel_id)}")
|
self.print_error(f"funding output script mismatch for {bh2u(short_channel_id)}")
|
||||||
self.started_verifying_channel.remove(short_channel_id)
|
self._remove_channel_from_unverified_db(short_channel_id)
|
||||||
return
|
return
|
||||||
# put channel into channel DB
|
# put channel into channel DB
|
||||||
channel_info.set_capacity(actual_output.value)
|
channel_info.set_capacity(actual_output.value)
|
||||||
self.channel_db.add_verified_channel_info(short_channel_id, channel_info)
|
self.channel_db.add_verified_channel_info(short_channel_id, channel_info)
|
||||||
# remove channel from unverified
|
self._remove_channel_from_unverified_db(short_channel_id)
|
||||||
|
|
||||||
|
def _remove_channel_from_unverified_db(self, short_channel_id: bytes):
|
||||||
with self.lock:
|
with self.lock:
|
||||||
self.unverified_channel_info.pop(short_channel_id, None)
|
self.unverified_channel_info.pop(short_channel_id, None)
|
||||||
self.started_verifying_channel.remove(short_channel_id)
|
try: self.started_verifying_channel.remove(short_channel_id)
|
||||||
|
except KeyError: pass
|
||||||
|
|
||||||
def _blacklist_short_channel_id(self, short_channel_id: bytes) -> None:
|
def _blacklist_short_channel_id(self, short_channel_id: bytes) -> None:
|
||||||
self.blacklist.add(short_channel_id)
|
self.blacklist.add(short_channel_id)
|
||||||
|
|
Loading…
Add table
Reference in a new issue