p2p/pex: Fix mismatch between dialseeds and checkseeds. (#2151)

This commit is contained in:
Dev Ojha 2018-08-05 11:47:01 -07:00 committed by Ethan Buchman
parent c5c2b9601f
commit d6a666b445
1 changed files with 1 additions and 6 deletions

View File

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