aboutsummaryrefslogtreecommitdiffstats
path: root/p2p/discover
diff options
context:
space:
mode:
authorWei-Ning Huang <w@dexon.org>2019-03-22 14:27:14 +0800
committerWei-Ning Huang <w@dexon.org>2019-04-09 21:32:58 +0800
commit2ccb785bf31b03897480977bb8a8da7c5556694d (patch)
tree9c55cc8bbce36058d6be9a299a2ceb8b2c53baed /p2p/discover
parentc58d86e0651d9aa7acb5d66da43ec7a3d6678126 (diff)
downloaddexon-2ccb785bf31b03897480977bb8a8da7c5556694d.tar.gz
dexon-2ccb785bf31b03897480977bb8a8da7c5556694d.tar.zst
dexon-2ccb785bf31b03897480977bb8a8da7c5556694d.zip
Revert "p2p/discover: increase IP address limits (#60)"
This reverts commit 3ca44e556bd9561b0c6c64c7d3a4f95726c78be8.
Diffstat (limited to 'p2p/discover')
-rw-r--r--p2p/discover/table.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/p2p/discover/table.go b/p2p/discover/table.go
index 1300fd01d..e8a219871 100644
--- a/p2p/discover/table.go
+++ b/p2p/discover/table.go
@@ -52,9 +52,8 @@ const (
bucketMinDistance = hashBits - nBuckets // Log distance of closest bucket
// IP address limits.
- // TODO(sonic): revert this change
- bucketIPLimit, bucketSubnet = 8, 24 // at most 2 addresses from the same /24
- tableIPLimit, tableSubnet = 16, 24
+ bucketIPLimit, bucketSubnet = 2, 24 // at most 2 addresses from the same /24
+ tableIPLimit, tableSubnet = 10, 24
maxFindnodeFailures = 5 // Nodes exceeding this limit are dropped
refreshInterval = 30 * time.Minute