From 7ff3a0feffe5df16719ad5d3eacdcacd5bbbe65c Mon Sep 17 00:00:00 2001 From: ThomasV Date: Thu, 22 Feb 2024 10:11:34 +0100 Subject: [PATCH] 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. --- electrum/submarine_swaps.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/electrum/submarine_swaps.py b/electrum/submarine_swaps.py index c7c37df29..84ecd7cf8 100644 --- a/electrum/submarine_swaps.py +++ b/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: