From d6a666b445f34ebabdd3d6b0d1202a6dd47bdbfa Mon Sep 17 00:00:00 2001 From: Dev Ojha Date: Sun, 5 Aug 2018 11:47:01 -0700 Subject: [PATCH] p2p/pex: Fix mismatch between dialseeds and checkseeds. (#2151) --- p2p/pex/pex_reactor.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/p2p/pex/pex_reactor.go b/p2p/pex/pex_reactor.go index 4220dd42..288cb0d1 100644 --- a/p2p/pex/pex_reactor.go +++ b/p2p/pex/pex_reactor.go @@ -504,12 +504,7 @@ func (r *PEXReactor) checkSeeds() (numOnline int, netAddrs []*p2p.NetAddress, er // randomly dial seeds until we connect to one or exhaust them func (r *PEXReactor) dialSeeds() { - lSeeds := len(r.config.Seeds) - if lSeeds == 0 { - return - } - - perm := cmn.RandPerm(lSeeds) + perm := cmn.RandPerm(len(r.seedAddrs)) // perm := r.Switch.rng.Perm(lSeeds) for _, i := range perm { // dial a random seed