From c42201ccac66ba5bcd5cf2f7043f6ee2158a7958 Mon Sep 17 00:00:00 2001 From: ThomasV Date: Tue, 11 Mar 2025 12:11:14 +0100 Subject: [PATCH] remove lnworker.enable_htlc_settle_onchain: not used I think this has only been used for manual testing --- electrum/lnwatcher.py | 5 ----- electrum/lnworker.py | 1 - 2 files changed, 6 deletions(-) diff --git a/electrum/lnwatcher.py b/electrum/lnwatcher.py index f05b9c3d1..dcff6800f 100644 --- a/electrum/lnwatcher.py +++ b/electrum/lnwatcher.py @@ -353,11 +353,6 @@ class LNWalletWatcher(LNWatcher): # self.logger.debug( # f"pending redeem for {prevout}. waiting for {name}: CSV " # f"({local_height=}, {wanted_height=}, {prev_height.height=}, {sweep_info.csv_delay=})") - if not (sweep_info.cltv_abs or sweep_info.csv_delay): - # used to control settling of htlcs onchain for testing purposes - # careful, this prevents revocation as well - if not self.lnworker.enable_htlc_settle_onchain: - return if can_broadcast: self.logger.info(f'we can broadcast: {name}') if await self.network.try_broadcasting(new_tx, name): diff --git a/electrum/lnworker.py b/electrum/lnworker.py index 6ea749d91..8881846ca 100644 --- a/electrum/lnworker.py +++ b/electrum/lnworker.py @@ -851,7 +851,6 @@ class LNWallet(LNWorker): self.logs = defaultdict(list) # type: Dict[str, List[HtlcLog]] # key is RHASH # (not persisted) # used in tests self.enable_htlc_settle = True - self.enable_htlc_settle_onchain = True self.enable_htlc_forwarding = True # note: accessing channels (besides simple lookup) needs self.lock!