1
0
This commit is contained in:
ThomasV
2020-06-19 17:41:51 +02:00
parent b55f6430f2
commit 937d8a1f0f

View File

@@ -1470,9 +1470,9 @@ class LNBackups(Logger):
decrypted = pw_decode_with_version_and_mac(encrypted, xpub)
cb_storage = ChannelBackupStorage.from_bytes(decrypted)
channel_id = cb_storage.channel_id().hex()
d = self.db.get_dict("channel_backups")
if channel_id in d:
if channel_id in self.db.get_dict("channels"):
raise Exception('Channel already in wallet')
d = self.db.get_dict("channel_backups")
d[channel_id] = cb_storage
self.channel_backups[bfh(channel_id)] = cb = ChannelBackup(cb_storage, sweep_address=self.sweep_address, lnworker=self)
self.wallet.save_db()