p2p/pex: Fix mismatch between dialseeds and checkseeds. (#2151)
This commit is contained in:
parent
c5c2b9601f
commit
d6a666b445
|
@ -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
|
// randomly dial seeds until we connect to one or exhaust them
|
||||||
func (r *PEXReactor) dialSeeds() {
|
func (r *PEXReactor) dialSeeds() {
|
||||||
lSeeds := len(r.config.Seeds)
|
perm := cmn.RandPerm(len(r.seedAddrs))
|
||||||
if lSeeds == 0 {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
perm := cmn.RandPerm(lSeeds)
|
|
||||||
// perm := r.Switch.rng.Perm(lSeeds)
|
// perm := r.Switch.rng.Perm(lSeeds)
|
||||||
for _, i := range perm {
|
for _, i := range perm {
|
||||||
// dial a random seed
|
// dial a random seed
|
||||||
|
|
Loading…
Reference in New Issue