Commit e4dae1c9 authored by Henrique Dias's avatar Henrique Dias

call it common prefix len

License: MIT
Signed-off-by: default avatarHenrique Dias <hacdias@gmail.com>
parent dca21f6a
......@@ -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) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment