From eb0f51e487e2dd168afc161ebbd58517184fbbab Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 7 Dec 2020 14:41:41 +0000 Subject: [PATCH] Don't show confusing message for blacklist expires (#13983) (#13985) (cherry picked from commit 2f374df494f6a5ca8e5cbe8801b61e07a0540247) Co-authored-by: Ryo Onodera --- validator/src/main.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/validator/src/main.rs b/validator/src/main.rs index c86c05bc75..b46c826739 100644 --- a/validator/src/main.rs +++ b/validator/src/main.rs @@ -212,7 +212,9 @@ fn get_rpc_node( ); if rpc_peers_blacklisted == rpc_peers_total { - retry_reason = if blacklist_timeout.elapsed().as_secs() > 60 { + retry_reason = if !blacklisted_rpc_nodes.is_empty() + && blacklist_timeout.elapsed().as_secs() > 60 + { // If all nodes are blacklisted and no additional nodes are discovered after 60 seconds, // remove the blacklist and try them all again blacklisted_rpc_nodes.clear();