mirror of
https://github.com/fluencelabs/go-libp2p-kad-dht
synced 2025-04-24 22:32:13 +00:00
call it common prefix len
License: MIT Signed-off-by: Henrique Dias <hacdias@gmail.com>
This commit is contained in:
parent
dca21f6a05
commit
e4dae1c931
4
dht.go
4
dht.go
@ -149,8 +149,8 @@ func makeDHT(ctx context.Context, h host.Host, dstore ds.Batching, protocols []p
|
||||
cmgr := h.ConnManager()
|
||||
|
||||
rt.PeerAdded = func(p peer.ID) {
|
||||
dist := kb.CommonPrefixLen(self, kb.ConvertPeerID(p))
|
||||
cmgr.TagPeer(p, "kbucket", 5+dist)
|
||||
commonPrefixLen := kb.CommonPrefixLen(self, kb.ConvertPeerID(p))
|
||||
cmgr.TagPeer(p, "kbucket", 5+commonPrefixLen)
|
||||
}
|
||||
|
||||
rt.PeerRemoved = func(p peer.ID) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user