only log errors, dial correct addresses

"this means if there are lookup errors or typos in the persistent_peers,
tendermint will fail to start ? didn't some one ask for us not to do
this previously ?"
This commit is contained in:
Anton Kaliaev
2018-04-06 12:35:48 +02:00
parent 6e39ec6e26
commit 3233c318ea

View File

@@ -350,12 +350,10 @@ func (sw *Switch) IsDialing(id ID) bool {
// DialPeersAsync dials a list of peers asynchronously in random order (optionally, making them persistent).
func (sw *Switch) DialPeersAsync(addrBook AddrBook, peers []string, persistent bool) error {
netAddrs, errs := NewNetAddressStrings(peers)
// only log errors, dial correct addresses
for _, err := range errs {
sw.Logger.Error("Error in peer's address", "err", err)
}
if len(errs) > 0 {
return errors.New("Errors in peer addresses (see errors above)")
}
ourAddr := sw.nodeInfo.NetAddress()