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 committed 2019-12-20 13:02:30 +02:00
1 parent b6f546503a
commit 25a8773736
2 files changed
+49

No files matched your search

+33
View File
@@ -272,6 +272,39 @@ var resultTestCases = []resultTestCase{
nodeFailure: &hops[1],
},
},
// Tests a single hop mpp timeout. Test that final node is not
// penalized. This is a temporary measure while we decide how to
// penalize mpp timeouts.
{
name: "one hop mpp timeout",
route: &routeOneHop,
failureSrcIdx: 1,
failure: &lnwire.FailMPPTimeout{},
expectedResult: &interpretedResult{
finalFailureReason: &reasonError,
nodeFailure: nil,
},
},
// Tests a two hop mpp timeout. Test that final node is not penalized
// and the intermediate hop is attributed the success. This is a
// temporary measure while we decide how to penalize mpp timeouts.
{
name: "two hop mpp timeout",
route: &routeTwoHop,
failureSrcIdx: 2,
failure: &lnwire.FailMPPTimeout{},
expectedResult: &interpretedResult{
pairResults: map[DirectedNodePair]pairResult{
getTestPair(0, 1): successPairResult(100),
},
finalFailureReason: &reasonError,
nodeFailure: nil,
},
},
}
// TestResultInterpretation executes a list of test cases that test the result