network: load gossip db early
The gossip db is loaded early when the network is started to save time when the gui is locked and a wallet not yet loaded. Side effects of the LNWallet to start peering when a channel db is loaded is circumvented.
This commit is contained in:
@@ -444,6 +444,9 @@ class Daemon(Logger):
|
||||
daemon_jobs.append(self.watchtower.run)
|
||||
if self.network:
|
||||
self.network.start(jobs=[self.fx.run])
|
||||
# prepare lightning functionality, also load channel db early
|
||||
self.network.maybe_init_lightning()
|
||||
self.network.channel_db.load_data()
|
||||
|
||||
self.taskgroup = TaskGroup()
|
||||
asyncio.run_coroutine_threadsafe(self._run(jobs=daemon_jobs), self.asyncio_loop)
|
||||
|
||||
Reference in New Issue
Block a user