Commit 6c1d38bc authored by Steven Allen's avatar Steven Allen

fix: use usefulConnMgrProtectedBuckets constant

parent 69152762
......@@ -187,7 +187,7 @@ func (q *query) recordPeerIsValuable(p peer.ID) {
// protect _too_ many peers.
commonPrefixLen := kb.CommonPrefixLen(q.dht.selfKey, kb.ConvertPeerID(p))
cmgr := q.dht.host.ConnManager()
if commonPrefixLen < 2 {
if commonPrefixLen < usefulConnMgrProtectedBuckets {
cmgr.Protect(p, dhtUsefulTag)
} else {
cmgr.TagPeer(p, dhtUsefulTag, usefulConnMgrScore)
......
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