wallet: save_db immediately after init_lightning() generates keys
Had a crash shortly after enabling lightning and the LN keys were lost... Though note that opening a channel triggers wallet.save_db(), so I think nothing of real value is at risk without this change.
This commit is contained in:
@@ -439,6 +439,7 @@ class Abstract_Wallet(ABC, Logger, EventListener):
|
||||
ln_xprv = node.to_xprv()
|
||||
self.db.put('lightning_privkey2', ln_xprv)
|
||||
self.lnworker = LNWallet(self, ln_xprv)
|
||||
self.save_db()
|
||||
if self.network:
|
||||
self._start_network_lightning()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user