mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-31 01:11:35 +00:00
reestablish_peers_and_channels: spawn tasks in for loop
This commit is contained in:
parent
38f1436d78
commit
51466930f2
1 changed files with 2 additions and 5 deletions
|
@ -797,11 +797,8 @@ class LNWorker(PrintError):
|
|||
if not chan.should_try_to_reestablish_peer():
|
||||
continue
|
||||
peer = self.peers.get(chan.node_id, None)
|
||||
if peer is None:
|
||||
await reestablish_peer_for_given_channel()
|
||||
else:
|
||||
coro = peer.reestablish_channel(chan)
|
||||
asyncio.run_coroutine_threadsafe(coro, self.network.asyncio_loop)
|
||||
coro = peer.reestablish_channel(chan) if peer else reestablish_peer_for_given_channel()
|
||||
await self.network.main_taskgroup.spawn(coro)
|
||||
|
||||
def current_feerate_per_kw(self):
|
||||
from .simple_config import FEE_LN_ETA_TARGET, FEERATE_FALLBACK_STATIC_FEE, FEERATE_REGTEST_HARDCODED
|
||||
|
|
Loading…
Add table
Reference in a new issue