electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 0c17954d37d360c0c7b1993d68006733420e1f2c
parent 2464b3ab8115e3098047252404afed6c9a25daf5
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:
Melectrum/lnchannel.py | 3+++
Melectrum/lnworker.py | 2++
2 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/electrum/lnchannel.py b/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". diff --git a/electrum/lnworker.py b/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(