aboutsummaryrefslogtreecommitdiffstats
path: root/swarm/network/simulations/discovery/discovery_test.go
diff options
context:
space:
mode:
authorholisticode <holistic.computing@gmail.com>2019-02-15 02:01:50 +0800
committerViktor TrĂ³n <viktor.tron@gmail.com>2019-02-15 02:01:50 +0800
commit2af24724dd5f3ab1994001854eb32c6a19f9f64a (patch)
tree3b683db9b4ceccf95d6d7bb641f3c13dda4bf483 /swarm/network/simulations/discovery/discovery_test.go
parentfab8c5a1cd6a1ef54922abe33db8bfaa1c73f169 (diff)
downloadgo-tangerine-2af24724dd5f3ab1994001854eb32c6a19f9f64a.tar
go-tangerine-2af24724dd5f3ab1994001854eb32c6a19f9f64a.tar.gz
go-tangerine-2af24724dd5f3ab1994001854eb32c6a19f9f64a.tar.bz2
go-tangerine-2af24724dd5f3ab1994001854eb32c6a19f9f64a.tar.lz
go-tangerine-2af24724dd5f3ab1994001854eb32c6a19f9f64a.tar.xz
go-tangerine-2af24724dd5f3ab1994001854eb32c6a19f9f64a.tar.zst
go-tangerine-2af24724dd5f3ab1994001854eb32c6a19f9f64a.zip
swarm/network: Saturation check for healthy networks (#19071)
* swarm/network: new saturation for implementation * swarm/network: re-added saturation func in Kademlia as it is used elsewhere * swarm/network: saturation with higher MinBinSize * swarm/network: PeersPerBin with depth check * swarm/network: edited tests to pass new saturated check * swarm/network: minor fix saturated check * swarm/network/simulations/discovery: fixed renamed RPC call * swarm/network: renamed to isSaturated and returns bool * swarm/network: early depth check
Diffstat (limited to 'swarm/network/simulations/discovery/discovery_test.go')
-rw-r--r--swarm/network/simulations/discovery/discovery_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/swarm/network/simulations/discovery/discovery_test.go b/swarm/network/simulations/discovery/discovery_test.go
index 86aa6f6dd..5227de3bb 100644
--- a/swarm/network/simulations/discovery/discovery_test.go
+++ b/swarm/network/simulations/discovery/discovery_test.go
@@ -267,7 +267,7 @@ func discoverySimulation(nodes, conns int, adapter adapters.NodeAdapter) (*simul
}
healthy := &network.Health{}
- if err := client.Call(&healthy, "hive_healthy", ppmap[common.Bytes2Hex(id.Bytes())]); err != nil {
+ if err := client.Call(&healthy, "hive_getHealthInfo", ppmap[common.Bytes2Hex(id.Bytes())]); err != nil {
return false, fmt.Errorf("error getting node health: %s", err)
}
log.Debug(fmt.Sprintf("node %4s healthy: connected nearest neighbours: %v, know nearest neighbours: %v,\n\n%v", id, healthy.ConnectNN, healthy.KnowNN, healthy.Hive))
@@ -352,7 +352,7 @@ func discoveryPersistenceSimulation(nodes, conns int, adapter adapters.NodeAdapt
healthy := &network.Health{}
addr := id.String()
ppmap := network.NewPeerPotMap(network.NewKadParams().NeighbourhoodSize, addrs)
- if err := client.Call(&healthy, "hive_healthy", ppmap[common.Bytes2Hex(id.Bytes())]); err != nil {
+ if err := client.Call(&healthy, "hive_getHealthInfo", ppmap[common.Bytes2Hex(id.Bytes())]); err != nil {
return fmt.Errorf("error getting node health: %s", err)
}
@@ -422,7 +422,7 @@ func discoveryPersistenceSimulation(nodes, conns int, adapter adapters.NodeAdapt
healthy := &network.Health{}
ppmap := network.NewPeerPotMap(network.NewKadParams().NeighbourhoodSize, addrs)
- if err := client.Call(&healthy, "hive_healthy", ppmap[common.Bytes2Hex(id.Bytes())]); err != nil {
+ if err := client.Call(&healthy, "hive_getHealthInfo", ppmap[common.Bytes2Hex(id.Bytes())]); err != nil {
return false, fmt.Errorf("error getting node health: %s", err)
}
log.Info(fmt.Sprintf("node %4s healthy: got nearest neighbours: %v, know nearest neighbours: %v", id, healthy.ConnectNN, healthy.KnowNN))