lnd icon indicating copy to clipboard operation
lnd copied to clipboard

routing: make payments loaded from disk timeout aware

Open yyforyongyu opened this issue 4 years ago • 4 comments

As mentioned in this TODO, when we resume payments from the disk, we never time out the payment lifecycle, which could cause the payment stuck in flight. To solve it,

  • Store timeout info to disk when creating the payment, a possible place would be PaymentCreationInfo.
  • Modify sendPayment to use the timeout when we resume payments from the disk.

We may also need to sanity check the timeout value set by the user is not too small, causing unnecessary failures in routing payments.

yyforyongyu avatar Jul 01 '21 23:07 yyforyongyu

As mentioned in this TODO,

Using a commit hash to link to the line as things have shifted so this isn't an accurate line number any more: https://github.com/lightningnetwork/lnd/blob/7dfe4018ce2f95c2f6a9ff04e370f668fc755138/routing/router.go#L1908

Roasbeef avatar Mar 17 '22 23:03 Roasbeef

Is this still an issue of interest?

MStreet3 avatar May 17 '23 00:05 MStreet3

@MStreet3 yes. But this should be attempted after #7503.

yyforyongyu avatar May 17 '23 03:05 yyforyongyu

This PR should also introduce the check that if payments are restarted but the invoice has already timed-out we do not attempt the payment and fail it immediately (see for more details: https://github.com/lightningnetwork/lnd/pull/7503#discussion_r1375211579)

ziggie1984 avatar Oct 29 '23 07:10 ziggie1984