p2p: lower discovery mixer timeout

This commit is contained in:
Felix Lange 2019-10-29 13:24:55 +01:00
parent 61523364dd
commit 70360e25fe

View file

@ -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)