1
0

lnwatcher.maybe_extract_preimage: early return if tx is unsigned

This commit is contained in:
ThomasV
2025-04-25 12:40:18 +02:00
parent ea03c673e9
commit a511ab8e78

View File

@@ -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]