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:
3 files changed
+33
-6
No files matched your search
@@ -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.
|
||||
|
||||
Reference in new issue
Block a user