loop icon indicating copy to clipboard operation
loop copied to clipboard

After prepayment fails lnd keeps trying to pay the swap, delaying failure notification.

Open gtochim opened this issue 1 year ago • 4 comments
trafficstars

A successful loop out involves two off chain payments: the prepay and the swap.

If the prepay fails early, the swap is bound to fail, but loop never communicates to lnd that it should stop trying to make this payment.

Once one of the offchain payment fails, we should ask lnd to "stop trying" to fulfill the other payment. We can't rely on lnd's timeout, since loop sets this to 60 minutes (this makes sense, since the swap payments might take a while to find a route).

Edit:

I'm on version v0.23.0-beta

gtochim avatar May 07 '24 18:05 gtochim

Additionally, if lnd eventually failed the payment with a timeout, we would continue to retry it.

gtochim avatar May 07 '24 18:05 gtochim

LND doesn't have an API that allows stopping trying a payment, but at a high level yeah potentially things can be improved here

Can you include the version of loopd you are using in the issue?

alexbosworth avatar May 07 '24 19:05 alexbosworth

I'm aware LND doesn't have that API, but I would be glad to open an issue in lnd's repo about it.

gtochim avatar May 07 '24 20:05 gtochim

Great yeah, there may be stuff we can do to workaround it but I can confirm that we do have this in-flight issue because of the lack of the cancel API

alexbosworth avatar May 07 '24 20:05 alexbosworth