From 90610de58ec99a83a419d14ac27f445312a9672b Mon Sep 17 00:00:00 2001 From: ThomasV Date: Wed, 20 Jul 2022 16:47:24 +0200 Subject: [PATCH] auto-remove redeemed channel backups This restores commit 02e45690868bd1fd86b92329697cf9539edb8747. That commit was reverted because I wrongly assumed that it would break lnworker.has_conflicting_backup_with. --- electrum/lnchannel.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/electrum/lnchannel.py b/electrum/lnchannel.py index 99b41549a..456d6e610 100644 --- a/electrum/lnchannel.py +++ b/electrum/lnchannel.py @@ -351,6 +351,9 @@ class AbstractChannel(Logger, ABC): if self.get_state() == ChannelState.CLOSED and not keep_watching: self.set_state(ChannelState.REDEEMED) + if self.lnworker and self.is_backup(): + # auto-remove redeemed backups + self.lnworker.remove_channel_backup(self.channel_id) @property def sweep_address(self) -> str: