mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
p2p: lower discovery mixer timeout
This commit is contained in:
parent
61523364dd
commit
70360e25fe
1 changed files with 6 additions and 1 deletions
|
|
@ -45,6 +45,11 @@ import (
|
|||
const (
|
||||
defaultDialTimeout = 15 * time.Second
|
||||
|
||||
// This is the fairness knob for the discovery mixer. When looking for peers, we'll
|
||||
// wait this long for a single source of candidates before moving on and trying other
|
||||
// sources.
|
||||
discmixTimeout = 5 * time.Second
|
||||
|
||||
// Connectivity defaults.
|
||||
maxActiveDialTasks = 16
|
||||
defaultMaxPendingPeers = 50
|
||||
|
|
@ -525,7 +530,7 @@ func (srv *Server) setupLocalNode() error {
|
|||
}
|
||||
|
||||
func (srv *Server) setupDiscovery() error {
|
||||
srv.discmix = enode.NewFairMix(fallbackInterval)
|
||||
srv.discmix = enode.NewFairMix(discmixTimeout)
|
||||
|
||||
// Add protocol-specific discovery sources.
|
||||
added := make(map[string]bool)
|
||||
|
|
|
|||
Loading…
Reference in a new issue