tdo not create backups for channels that do not have static_remotekey - electrum - Electrum Bitcoin wallet
HTML git clone https://git.parazyd.org/electrum
DIR Log
DIR Files
DIR Refs
DIR Submodules
---
DIR commit 0c17954d37d360c0c7b1993d68006733420e1f2c
DIR parent 2464b3ab8115e3098047252404afed6c9a25daf5
HTML Author: ThomasV <thomasv@electrum.org>
Date: Sat, 6 Jun 2020 12:28:08 +0200
do not create backups for channels that do not have static_remotekey
Diffstat:
M electrum/lnchannel.py | 3 +++
M electrum/lnworker.py | 2 ++
2 files changed, 5 insertions(+), 0 deletions(-)
---
DIR diff --git a/electrum/lnchannel.py b/electrum/lnchannel.py
t@@ -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".
DIR diff --git a/electrum/lnworker.py b/electrum/lnworker.py
t@@ -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(