Don't show confusing message for blacklist expires (#13983)

This commit is contained in:
Ryo Onodera 2020-12-07 21:47:27 +09:00 committed by GitHub
parent 26df122386
commit 2f374df494
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -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();