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:
carla
2019-12-20 12:25:08 +02:00
parent b6f546503a
commit 25a8773736
2 changed files with 49 additions and 0 deletions

View File

@@ -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