1
0

normal swaps: do not try to get a refund if we have the preimage.

The other party's claim transaction might still be unconfirmed
at that point.
This commit is contained in:
ThomasV
2024-10-31 10:13:24 +01:00
parent 974ed6828e
commit f41a8105a1

View File

@@ -355,6 +355,9 @@ class SwapManager(Logger):
if remaining_time > 0:
# too early for refund
return
if swap.preimage:
# we have been paid. do not try to get refund.
return
else:
if swap.preimage is None:
swap.preimage = self.lnworker.get_preimage(swap.payment_hash)