Skip to content

Commit

Permalink
temp limitation
Browse files Browse the repository at this point in the history
  • Loading branch information
czarcas7ic committed Jun 23, 2024
1 parent b24e15c commit 3191226
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions p2p/pex/addrbook.go
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,13 @@ func (a *addrBook) PickAddressWithRegion(biasTowardsNewAddrs int, region string)

// Filter the bucket by region
filteredBucket := make(map[string]*knownAddress)
// TEMP, only adding max of 5 from bucket
count := 0
for addrStr, ka := range bucket {
if count > 5 {
break
}
count++
if ka.Region == "" {
region, err := getRegionFromIP(ka.Addr.IP.String())
if err != nil {
Expand Down

0 comments on commit 3191226

Please sign in to comment.