routing: also fail pairs for node-level failures

This commit modifies the interpretation of node-level failures.
Previously only the failing node was marked. With this commit, also the
incoming and outgoing connections involved in the route are marked as
failed.

The change prepares for the removal of node-level failures in mission
control probability estimation.
This commit is contained in:
Joost Jager committed 2019-10-22 15:52:34 +02:00
1 parent 843c87a203
commit 559d3c0910
3 files changed
+33 -6

No files matched your search

+4 -4
View File
@@ -165,8 +165,8 @@ func TestMissionControl(t *testing.T) {
ctx.restartMc()
ctx.expectP(1000, 0.4)
// A node level failure should bring probability of every channel back
// to zero.
// A node level failure should bring probability of all known channels
// back to zero.
ctx.reportFailure(0, lnwire.NewExpiryTooSoon(lnwire.ChannelUpdate{}))
ctx.expectP(1000, 0)
@@ -177,8 +177,8 @@ func TestMissionControl(t *testing.T) {
len(history.Nodes))
}
if len(history.Pairs) != 2 {
t.Fatalf("expected 2 pairs, but got %v", len(history.Pairs))
if len(history.Pairs) != 3 {
t.Fatalf("expected 3 pairs, but got %v", len(history.Pairs))
}
// Test reporting a success.