From a511ab8e78164bb1ed617a66b59d4cadfc46c501 Mon Sep 17 00:00:00 2001 From: ThomasV Date: Fri, 25 Apr 2025 12:40:18 +0200 Subject: [PATCH] lnwatcher.maybe_extract_preimage: early return if tx is unsigned --- electrum/lnwatcher.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/electrum/lnwatcher.py b/electrum/lnwatcher.py index c4c2c9d13..d81c2326b 100644 --- a/electrum/lnwatcher.py +++ b/electrum/lnwatcher.py @@ -195,6 +195,9 @@ class LNWatcher(Logger, EventListener): return True def maybe_extract_preimage(self, chan: 'AbstractChannel', spender_tx: Transaction, prevout: str): + if not spender_tx.is_complete(): + self.logger.info('spender tx is unsigned') + return txin_idx = spender_tx.get_input_idx_that_spent_prevout(TxOutpoint.from_str(prevout)) assert txin_idx is not None spender_txin = spender_tx.inputs()[txin_idx]