Skip to content

Commit ff1a117

Browse files
authored
query.go: Remove shuffle comment
As far as I can tell the list of peers is not being shuffled in this function. In addition [`NearestPeers`](https://github.com/libp2p/go-libp2p-kbucket/blob/a8232c8ad2e784b3966d04f86a28f9223d1d11a8/table.go#L323) returns them in sorted order. Hope I am not missing something.
1 parent 6edcea2 commit ff1a117

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
@@ -138,7 +138,7 @@ processFollowUp:
138138
}
139139

140140
func (dht *IpfsDHT) runQuery(ctx context.Context, target string, queryFn queryFn, stopFn stopFn) (*lookupWithFollowupResult, error) {
141-
// pick the K closest peers to the key in our Routing table and shuffle them.
141+
// pick the K closest peers to the key in our Routing table.
142142
targetKadID := kb.ConvertKey(target)
143143
seedPeers := dht.routingTable.NearestPeers(targetKadID, dht.bucketSize)
144144
if len(seedPeers) == 0 {

0 commit comments

Comments
 (0)