From e99a5a77032b551521e92a89d47987c048bc860b Mon Sep 17 00:00:00 2001 From: ThomasV Date: Wed, 25 May 2022 12:34:52 +0200 Subject: [PATCH] fix lnwatcher broadcast logic, follow-up b9f01a86fe24219d3456ef8a72e2f6d43b9bf161 --- electrum/lnwatcher.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/electrum/lnwatcher.py b/electrum/lnwatcher.py index b8ed43039..8bd49273a 100644 --- a/electrum/lnwatcher.py +++ b/electrum/lnwatcher.py @@ -446,7 +446,7 @@ class LNWalletWatcher(LNWatcher): if sweep_info.csv_delay: prev_height = self.get_tx_height(prev_txid) wanted_height = sweep_info.csv_delay + prev_height.height - 1 - if prev_height.height > 0 and wanted_height - local_height > 0: + if prev_height.height <= 0 or wanted_height - local_height > 0: broadcast = False reason = 'waiting for {}: CSV ({} >= {}), prevout: {}'.format(name, prev_height.conf, sweep_info.csv_delay, prevout) tx = sweep_info.gen_tx()