Skip to content

Commit

Permalink
fix p2p too much logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Ji Qiren committed Jun 7, 2022
1 parent cea7b29 commit 08c4516
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion p2p/peer_manager.go
Expand Up @@ -531,10 +531,13 @@ func (pm *PeerManager) routingQuery(ids []string) {
if pm.NeighborCount(outbound) >= pm.neighborCap[outbound] {
return
}

time.Sleep(2 * time.Second)
maxConcurrentQueryNum := pm.neighborCap[outbound] - pm.NeighborCount(outbound)
queryingPeerIDs := []PeerID{}
for ; i < len(perm); i++ {
for i < len(perm) {
peerID := allPeerIDs[perm[i]]
i++
if peerID == pm.host.ID() {
continue
}
Expand Down

0 comments on commit 08c4516

Please sign in to comment.