From 3f4e26019a042afef99825b3c53bd7544ecfa81a Mon Sep 17 00:00:00 2001 From: gop Date: Tue, 27 Sep 2022 15:59:58 -0500 Subject: [PATCH] Updated the kademlia consts in discover/table.go https://github.com/dominant-strategies/go-quai/issues/546 to track this change. --- p2p/discover/table.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/p2p/discover/table.go b/p2p/discover/table.go index d8110c8f23..18a200ad69 100644 --- a/p2p/discover/table.go +++ b/p2p/discover/table.go @@ -39,24 +39,24 @@ import ( ) const ( - alpha = 3 // Kademlia concurrency factor + alpha = 6 // Kademlia concurrency factor bucketSize = 16 // Kademlia bucket size maxReplacements = 10 // Size of per-bucket replacement list // We keep buckets for the upper 1/15 of distances because // it's very unlikely we'll ever encounter a node that's closer. hashBits = len(common.Hash{}) * 8 - nBuckets = hashBits / 15 // Number of buckets + nBuckets = hashBits // Number of buckets 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 + bucketIPLimit, bucketSubnet = 24, 24 // at most 2 addresses from the same /24 + tableIPLimit, tableSubnet = 24, 24 refreshInterval = 30 * time.Minute revalidateInterval = 10 * time.Second copyNodesInterval = 30 * time.Second - seedMinTableTime = 5 * time.Minute + seedMinTableTime = 1 * time.Second seedCount = 30 seedMaxAge = 5 * 24 * time.Hour )