Browse Source

submarine swaps: fail htlc with INCORRECT_OR_UNKNOWN_PAYMENT_DETAILS

If the sender uses trampoline, UNKNOWN_NEXT_PEER causes them to
retry, while INCORRECT_OR_UNKNOWN_PAYMENT_DETAILS breaks the loop.
master
ThomasV 2 years ago
parent
commit
7ff3a0feff
  1. 2
      electrum/submarine_swaps.py

2
electrum/submarine_swaps.py

@ -261,7 +261,7 @@ class SwapManager(Logger):
self.lnworker.unregister_hold_invoice(swap.payment_hash)
payment_secret = self.lnworker.get_payment_secret(swap.payment_hash)
payment_key = swap.payment_hash + payment_secret
e = OnionRoutingFailure(code=OnionFailureCode.UNKNOWN_NEXT_PEER, data=b'')
e = OnionRoutingFailure(code=OnionFailureCode.INCORRECT_OR_UNKNOWN_PAYMENT_DETAILS, data=b'')
self.lnworker.save_forwarding_failure(payment_key.hex(), failure_message=e)
self.lnwatcher.remove_callback(swap.lockup_address)
if swap.funding_txid is None:

Loading…
Cancel
Save