Browse Source

do not create backups for channels that do not have static_remotekey

bip39-recovery
ThomasV 5 years ago
parent
commit
0c17954d37
  1. 3
      electrum/lnchannel.py
  2. 2
      electrum/lnworker.py

3
electrum/lnchannel.py

@ -461,6 +461,9 @@ class ChannelBackup(AbstractChannel):
def is_frozen_for_receiving(self) -> bool:
return False
def is_static_remotekey_enabled(self) -> bool:
return True
class Channel(AbstractChannel):
# note: try to avoid naming ctns/ctxs/etc as "current" and "pending".

2
electrum/lnworker.py

@ -1360,6 +1360,8 @@ class LNWallet(LNWorker):
def create_channel_backup(self, channel_id):
chan = self._channels[channel_id]
# do not backup old-style channels
assert chan.is_static_remotekey_enabled()
peer_addresses = list(chan.get_peer_addresses())
peer_addr = peer_addresses[0]
return ChannelBackupStorage(

Loading…
Cancel
Save