1
0

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:
SomberNight
2023-04-23 00:06:45 +00:00
parent 0fcf423fbe
commit 6b0db411ae

View File

@@ -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()