Skip to content

Commit 6c1d38b

Browse files
committed
fix: use usefulConnMgrProtectedBuckets constant
1 parent 6915276 commit 6c1d38b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

query.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ func (q *query) recordPeerIsValuable(p peer.ID) {
187187
// protect _too_ many peers.
188188
commonPrefixLen := kb.CommonPrefixLen(q.dht.selfKey, kb.ConvertPeerID(p))
189189
cmgr := q.dht.host.ConnManager()
190-
if commonPrefixLen < 2 {
190+
if commonPrefixLen < usefulConnMgrProtectedBuckets {
191191
cmgr.Protect(p, dhtUsefulTag)
192192
} else {
193193
cmgr.TagPeer(p, dhtUsefulTag, usefulConnMgrScore)

0 commit comments

Comments
 (0)