1
0

do not create backups for channels that do not have static_remotekey

This commit is contained in:
ThomasV
2020-06-06 12:28:08 +02:00
parent 2464b3ab81
commit 0c17954d37
2 changed files with 5 additions and 0 deletions

View File

@@ -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".

View File

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