aboutsummaryrefslogtreecommitdiffstats
path: root/p2p
diff options
context:
space:
mode:
authorSonic <sonic@dexon.org>2018-11-28 16:35:40 +0800
committerWei-Ning Huang <w@dexon.org>2018-12-19 20:54:27 +0800
commit8985d37a2e90c99bf7a1e9afd1ef87f67745b51c (patch)
tree563ae3cb549b21185fa25c96523dc231906a2b55 /p2p
parent0dbbf2aebc377bbe2b55c6fd24795482fdbaec1e (diff)
downloaddexon-8985d37a2e90c99bf7a1e9afd1ef87f67745b51c.tar
dexon-8985d37a2e90c99bf7a1e9afd1ef87f67745b51c.tar.gz
dexon-8985d37a2e90c99bf7a1e9afd1ef87f67745b51c.tar.bz2
dexon-8985d37a2e90c99bf7a1e9afd1ef87f67745b51c.tar.lz
dexon-8985d37a2e90c99bf7a1e9afd1ef87f67745b51c.tar.xz
dexon-8985d37a2e90c99bf7a1e9afd1ef87f67745b51c.tar.zst
dexon-8985d37a2e90c99bf7a1e9afd1ef87f67745b51c.zip
p2p/discover: increase IP address limits (#60)
Diffstat (limited to 'p2p')
-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 2b4640211..f0f099d64 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