mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-06 01:18:17 +02:00
routing: interpret mpp timeout failues
This commit adds success mission control results for all hops along the route in a mpp timeout and takes no action for the final hop along the route. This is a temporary measure to prevent the default logic from penalizing the final node while we decide how to penalize mpp timeouts.
This commit is contained in:
@@ -216,6 +216,22 @@ func (i *interpretedResult) processPaymentOutcomeFinal(
|
||||
// deliberately. What to penalize?
|
||||
i.finalFailureReason = &reasonIncorrectDetails
|
||||
|
||||
case *lnwire.FailMPPTimeout:
|
||||
// TODO(carla): decide how to penalize mpp timeout. In the
|
||||
// meantime, attribute success to the hops along the route and
|
||||
// do not penalize the final node.
|
||||
|
||||
i.finalFailureReason = &reasonError
|
||||
|
||||
// If this is a direct payment, take no action.
|
||||
if n == 1 {
|
||||
return
|
||||
}
|
||||
|
||||
// Assign all pairs a success result except the final hop, as
|
||||
// the payment reached the destination correctly.
|
||||
i.successPairRange(route, 0, n-2)
|
||||
|
||||
default:
|
||||
// All other errors are considered terminal if coming from the
|
||||
// final hop. They indicate that something is wrong at the
|
||||
|
Reference in New Issue
Block a user