diff --git a/swarm/network/hive.go b/swarm/network/hive.go index ceed3bd86c..6c928416ff 100644 --- a/swarm/network/hive.go +++ b/swarm/network/hive.go @@ -244,7 +244,10 @@ func (h *Hive) savePeers() error { } // Healthy is an api proxy to the underlying kademlia healthy function -func (h *Hive) Healthy(addr []byte, pp PeerPot) *Health { - pp.base = addr - return pp.Healthy() +func (h *Hive) Healthy(addrs [][]byte) *Health { + k := NewKademlia(h.BaseAddr(), NewKadParams()) + for _, a := range addrs { + k.On(a) + } + return pp.Healthy([]*Kademlia{k}) } diff --git a/swarm/network/simulations/discovery/discovery_test.go b/swarm/network/simulations/discovery/discovery_test.go index 7b89de5467..3dde1028fa 100644 --- a/swarm/network/simulations/discovery/discovery_test.go +++ b/swarm/network/simulations/discovery/discovery_test.go @@ -412,7 +412,8 @@ func discoveryPersistenceSimulation(nodes, conns int, adapter adapters.NodeAdapt addr := id.String() log.Error("before hive healthy call") pp := ppmap[addr] - if err := client.Call(&healthy, "hive_healthy", pp.BaseAddr(), pp); err != nil { + // if err := client.Call(&healthy, "hive_healthy", pp.BaseAddr(), pp); err != nil { + if err := client.Call(&healthy, "hive_healthy", pp.BaseAddr(), addrs); err != nil { return fmt.Errorf("error getting node health: %s", err) }