aboutsummaryrefslogtreecommitdiffstats
path: root/p2p
diff options
context:
space:
mode:
authorSonic <sonic@dexon.org>2018-11-28 16:35:40 +0800
committerWei-Ning Huang <w@byzantine-lab.io>2019-06-12 17:27:19 +0800
commitd087993feba4c9071bf57f9ad4ddb50ff2f05224 (patch)
tree89d4b9b92647565685e4e4c520c8a3c5a46dfc7a /p2p
parenteea0925b09140f99cbf401fd0b8a50958e711bde (diff)
downloadgo-tangerine-d087993feba4c9071bf57f9ad4ddb50ff2f05224.tar
go-tangerine-d087993feba4c9071bf57f9ad4ddb50ff2f05224.tar.gz
go-tangerine-d087993feba4c9071bf57f9ad4ddb50ff2f05224.tar.bz2
go-tangerine-d087993feba4c9071bf57f9ad4ddb50ff2f05224.tar.lz
go-tangerine-d087993feba4c9071bf57f9ad4ddb50ff2f05224.tar.xz
go-tangerine-d087993feba4c9071bf57f9ad4ddb50ff2f05224.tar.zst
go-tangerine-d087993feba4c9071bf57f9ad4ddb50ff2f05224.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 e8a219871..1300fd01d 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