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:
@@ -613,6 +613,8 @@ class ChannelDB(SqlDB):
|
||||
@sql
|
||||
@profiler
|
||||
def load_data(self):
|
||||
if self.data_loaded.is_set():
|
||||
return
|
||||
# Note: this method takes several seconds... mostly due to lnmsg.decode_msg being slow.
|
||||
# I believe lnmsg (and lightning.json) will need a rewrite anyway, so instead of tweaking
|
||||
# load_data() here, that should be done. see #6006
|
||||
|
||||
Reference in New Issue
Block a user