mirror of
https://github.com/tendermint/tendermint.git
synced 2026-01-08 06:15:33 +00:00
preserve dial to itself
This commit is contained in:
@@ -8,7 +8,6 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
|
||||
amino "github.com/tendermint/go-amino"
|
||||
cmn "github.com/tendermint/tendermint/libs/common"
|
||||
"github.com/tendermint/tendermint/p2p"
|
||||
@@ -411,6 +410,10 @@ func (r *PEXReactor) ensurePeers() {
|
||||
if r.Switch.IsDialingOrExistingAddress(try) {
|
||||
continue
|
||||
}
|
||||
if r.Switch.NodeInfo().ID() == try.ID {
|
||||
continue // we don't want to dial ourselves, usually.
|
||||
}
|
||||
|
||||
// TODO: consider moving some checks from toDial into here
|
||||
// so we don't even consider dialing peers that we want to wait
|
||||
// before dialling again, or have dialed too many times already
|
||||
|
||||
Reference in New Issue
Block a user