Kademlia refactor (#17641)
* swarm/network: simplify kademlia/hive; rid interfaces * swarm, swarm/network/stream, swarm/netork/simulations,, swarm/pss: adapt to new Kad API * swarm/network: minor changes re review; add missing lock to NeighbourhoodDepthC
This commit is contained in:
committed by
Balint Gabor
parent
b06ff563a1
commit
bfce00385f
@@ -556,8 +556,8 @@ func newService(ctx *adapters.ServiceContext) (node.Service, error) {
|
||||
kp.MinProxBinSize = testMinProxBinSize
|
||||
|
||||
if ctx.Config.Reachable != nil {
|
||||
kp.Reachable = func(o network.OverlayAddr) bool {
|
||||
return ctx.Config.Reachable(o.(*network.BzzAddr).ID())
|
||||
kp.Reachable = func(o *network.BzzAddr) bool {
|
||||
return ctx.Config.Reachable(o.ID())
|
||||
}
|
||||
}
|
||||
kad := network.NewKademlia(addr.Over(), kp)
|
||||
|
Reference in New Issue
Block a user