mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-28 07:51:27 +00:00
run lnworker.main_loop directly on the event loop
This commit is contained in:
parent
1d667fe932
commit
73325831b7
1 changed files with 1 additions and 2 deletions
|
@ -232,11 +232,10 @@ class LNWorker(Logger):
|
||||||
assert network
|
assert network
|
||||||
self.network = network
|
self.network = network
|
||||||
self.config = network.config
|
self.config = network.config
|
||||||
daemon = network.daemon
|
|
||||||
self.channel_db = self.network.channel_db
|
self.channel_db = self.network.channel_db
|
||||||
self._last_tried_peer = {} # type: Dict[LNPeerAddr, float] # LNPeerAddr -> unix timestamp
|
self._last_tried_peer = {} # type: Dict[LNPeerAddr, float] # LNPeerAddr -> unix timestamp
|
||||||
self._add_peers_from_config()
|
self._add_peers_from_config()
|
||||||
asyncio.run_coroutine_threadsafe(daemon.taskgroup.spawn(self.main_loop()), self.network.asyncio_loop)
|
asyncio.run_coroutine_threadsafe(self.main_loop(), self.network.asyncio_loop)
|
||||||
|
|
||||||
def _add_peers_from_config(self):
|
def _add_peers_from_config(self):
|
||||||
peer_list = self.config.get('lightning_peers', [])
|
peer_list = self.config.get('lightning_peers', [])
|
||||||
|
|
Loading…
Add table
Reference in a new issue