do not create backups for channels that do not have static_remotekey
This commit is contained in:
@@ -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".
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user