From 6d4f18aa8c8f53f4bf7143bb68d64baf2099ac8d Mon Sep 17 00:00:00 2001 From: folex <0xdxdy@gmail.com> Date: Thu, 25 Jul 2019 14:58:14 +0300 Subject: [PATCH] p2p: Do not write 'Couldn't connect to any seeds' if there are no seeds (#3834) * Do not write 'Couldn't connect to any seeds' if there are no seeds * changelog * remove privValUpgrade * Fix typo in changelog * Update CHANGELOG_PENDING.md Co-Authored-By: Marko I'm setting up all peers dynamically by calling dial_peers, so p2p.seeds in configs is empty, and I'm seeing error log a lot in logs. --- CHANGELOG_PENDING.md | 1 + p2p/pex/pex_reactor.go | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG_PENDING.md b/CHANGELOG_PENDING.md index e05213fc..9e229eb2 100644 --- a/CHANGELOG_PENDING.md +++ b/CHANGELOG_PENDING.md @@ -20,6 +20,7 @@ program](https://hackerone.com/tendermint). ### IMPROVEMENTS: +- [p2p] \#3834 Do not write 'Couldn't connect to any seeds' error log if there are no seeds in config file - [abci] \#3809 Recover from application panics in `server/socket_server.go` to allow socket cleanup (@ruseinov) - [rpc] \#2252 Add `/broadcast_evidence` endpoint to submit double signing and other types of evidence - [rpc] \#3818 Make `max_body_bytes` and `max_header_bytes` configurable diff --git a/p2p/pex/pex_reactor.go b/p2p/pex/pex_reactor.go index 557e7ca7..55cde5a3 100644 --- a/p2p/pex/pex_reactor.go +++ b/p2p/pex/pex_reactor.go @@ -594,7 +594,10 @@ func (r *PEXReactor) dialSeeds() { } r.Switch.Logger.Error("Error dialing seed", "err", err, "seed", seedAddr) } - r.Switch.Logger.Error("Couldn't connect to any seeds") + // do not write error message if there were no seeds specified in config + if len(r.seedAddrs) > 0 { + r.Switch.Logger.Error("Couldn't connect to any seeds") + } } // AttemptsToDial returns the number of attempts to dial specific address. It