mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-12-19 20:25:51 +01:00
routing: add new PayAttemptTimeout field to LightningPayment
In this commit, we add a new field to the LightningPayment struct: PayAttemptTimeout. This new field allows the caller to control exactly how much time should be spent attempting to route a payment to the destination. The default value we’ll use is 60 seconds, but callers are able to specify a diff value. Once the timeout has passed, we’ll abandon th e payment attempt, and return an error back to the original caller.
This commit is contained in:
@@ -38,6 +38,10 @@ const (
|
||||
// this update can't bring us something new, or because a node
|
||||
// announcement was given for node not found in any channel.
|
||||
ErrIgnored
|
||||
|
||||
// ErrPaymentAttemptTimeout is an error that indicates that a payment
|
||||
// attempt timed out before we were able to successfully route an HTLC.
|
||||
ErrPaymentAttemptTimeout
|
||||
)
|
||||
|
||||
// routerError is a structure that represent the error inside the routing package,
|
||||
|
||||
Reference in New Issue
Block a user