Skip to content

Commit

Permalink
DEV ONLY: made modifications to allow us to dev without dropping peers.
Browse files Browse the repository at this point in the history
  • Loading branch information
kiltsonfire authored and wizeguyy committed Jul 28, 2022
1 parent 2e02ab5 commit 63b2b2e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions eth/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -357,10 +357,10 @@ func (h *handler) runSnapExtension(peer *snap.Peer, handler snap.Handler) error

// removePeer requests disconnection of a peer.
func (h *handler) removePeer(id string) {
peer := h.peers.peer(id)
if peer != nil {
peer.Peer.Disconnect(p2p.DiscUselessPeer)
}
// peer := h.peers.peer(id)
// if peer != nil {
// peer.Peer.Disconnect(p2p.DiscUselessPeer)
// }
}

// unregisterPeer removes a peer from the downloader, fetchers and main peer set.
Expand Down
8 changes: 4 additions & 4 deletions p2p/discover/table.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ 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

Expand All @@ -50,13 +50,13 @@ 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
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
)
Expand Down

0 comments on commit 63b2b2e

Please sign in to comment.