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:
@@ -355,6 +355,9 @@ class SwapManager(Logger):
|
|||||||
if remaining_time > 0:
|
if remaining_time > 0:
|
||||||
# too early for refund
|
# too early for refund
|
||||||
return
|
return
|
||||||
|
if swap.preimage:
|
||||||
|
# we have been paid. do not try to get refund.
|
||||||
|
return
|
||||||
else:
|
else:
|
||||||
if swap.preimage is None:
|
if swap.preimage is None:
|
||||||
swap.preimage = self.lnworker.get_preimage(swap.payment_hash)
|
swap.preimage = self.lnworker.get_preimage(swap.payment_hash)
|
||||||
|
|||||||
Reference in New Issue
Block a user