mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 02:42:27 +00:00
swarm/network: Kademlia tests GotNN => ConnectNN
This commit is contained in:
parent
89ea2fe97f
commit
04a3cffc78
1 changed files with 2 additions and 2 deletions
|
|
@ -242,7 +242,7 @@ func assertHealth(t *testing.T, k *Kademlia, expectHealthy bool, expectSaturatio
|
||||||
// - we at least know one peer
|
// - we at least know one peer
|
||||||
// - we know all neighbors
|
// - we know all neighbors
|
||||||
// - we are connected to all known neighbors
|
// - we are connected to all known neighbors
|
||||||
health := healthParams.KnowNN && healthParams.GotNN && healthParams.CountKnowNN > 0
|
health := healthParams.KnowNN && healthParams.ConnectNN && healthParams.CountKnowNN > 0
|
||||||
if expectHealthy != health {
|
if expectHealthy != health {
|
||||||
t.Fatalf("expected kademlia health %v, is %v\n%v", expectHealthy, health, k.String())
|
t.Fatalf("expected kademlia health %v, is %v\n%v", expectHealthy, health, k.String())
|
||||||
}
|
}
|
||||||
|
|
@ -647,7 +647,7 @@ func testKademliaCase(t *testing.T, pivotAddr string, addrs ...string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
h := k.Healthy(pp)
|
h := k.Healthy(pp)
|
||||||
if !(h.GotNN && h.KnowNN && h.CountKnowNN > 0) {
|
if !(h.ConnectNN && h.KnowNN && h.CountKnowNN > 0) {
|
||||||
t.Fatalf("not healthy: %#v\n%v", h, k.String())
|
t.Fatalf("not healthy: %#v\n%v", h, k.String())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue