aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSonic <sonic@dexon.org>2018-11-28 16:35:40 +0800
committerWei-Ning Huang <w@dexon.org>2019-03-12 12:19:09 +0800
commit3ca44e556bd9561b0c6c64c7d3a4f95726c78be8 (patch)
tree151ef04c066e08bd4c44bc25f153d5954af5a621
parent3ea471f0ccef747435222bca4766f9a13af0e75e (diff)
downloaddexon-3ca44e556bd9561b0c6c64c7d3a4f95726c78be8.tar.gz
dexon-3ca44e556bd9561b0c6c64c7d3a4f95726c78be8.tar.zst
dexon-3ca44e556bd9561b0c6c64c7d3a4f95726c78be8.zip
p2p/discover: increase IP address limits (#60)
-rw-r--r--p2p/discover/table.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/p2p/discover/table.go b/p2p/discover/table.go
index b58d9b2f4..fce52cbcc 100644
--- a/p2p/discover/table.go
+++ b/p2p/discover/table.go
@@ -52,8 +52,9 @@ const (
bucketMinDistance = hashBits - nBuckets // Log distance of closest bucket
// IP address limits.
- bucketIPLimit, bucketSubnet = 2, 24 // at most 2 addresses from the same /24
- tableIPLimit, tableSubnet = 10, 24
+ // TODO(sonic): revert this change
+ bucketIPLimit, bucketSubnet = 8, 24 // at most 2 addresses from the same /24
+ tableIPLimit, tableSubnet = 16, 24
maxFindnodeFailures = 5 // Nodes exceeding this limit are dropped
refreshInterval = 30 * time.Minute