diff --git a/autopilot/prefattach_test.go b/autopilot/prefattach_test.go index adaee08b7..c647c2d92 100644 --- a/autopilot/prefattach_test.go +++ b/autopilot/prefattach_test.go @@ -436,6 +436,11 @@ func TestConstrainedPrefAttachmentSelectTwoVertexes(t *testing.T) { "to be %v, instead was %v", expScore, candidate.Score) } + + if len(candidate.Addrs) == 0 { + t1.Fatalf("expected node to have " + + "available addresses, didn't") + } } }) if !success { @@ -633,6 +638,11 @@ func TestConstrainedPrefAttachmentSelectGreedyAllocation(t *testing.T) { "of %v, instead got %v", maxChanSize, candidate.ChanAmt) } + + if len(candidate.Addrs) == 0 { + t1.Fatalf("expected node to have " + + "available addresses, didn't") + } } // Imagine a few channels are being opened, and there's @@ -663,6 +673,11 @@ func TestConstrainedPrefAttachmentSelectGreedyAllocation(t *testing.T) { "of %v, instead got %v", remBalance, candidate.ChanAmt) } + + if len(candidate.Addrs) == 0 { + t1.Fatalf("expected node to have " + + "available addresses, didn't") + } } }) if !success { @@ -753,6 +768,11 @@ func TestConstrainedPrefAttachmentSelectSkipNodes(t *testing.T) { "of %v, instead got %v", maxChanSize, candidate.ChanAmt) } + + if len(candidate.Addrs) == 0 { + t1.Fatalf("expected node to have " + + "available addresses, didn't") + } } // We'll simulate a channel update by adding the nodes