autopilot/prefattach_test: assert scored nodes having addresses
This addtion to the test makes sure the scored nodes have their addresses populated. This would fail without the previous commit.
This commit is contained in:
parent
d9eef4625e
commit
5224c94aaf
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user