From e12293a9dd350eb96312aac313b38ea471dc128f Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Wed, 1 Nov 2023 09:35:50 -0700 Subject: [PATCH] warn when no ranked rpcs found --- web3_proxy/src/rpcs/consensus.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/web3_proxy/src/rpcs/consensus.rs b/web3_proxy/src/rpcs/consensus.rs index 5d64179d..73436aee 100644 --- a/web3_proxy/src/rpcs/consensus.rs +++ b/web3_proxy/src/rpcs/consensus.rs @@ -394,11 +394,14 @@ impl ConsensusFinder { new_block: Option, ) -> Web3ProxyResult { let new_ranked_rpcs = match self - .find_consensus_connections(web3_rpcs) + .rank_rpcs(web3_rpcs) .await .web3_context("error while finding consensus head block!")? { - None => return Ok(false), + None => { + warn!("no ranked rpcs found!"); + return Ok(false); + } Some(x) => x, }; @@ -748,10 +751,7 @@ impl ConsensusFinder { Ok(()) } - pub async fn find_consensus_connections( - &mut self, - web3_rpcs: &Web3Rpcs, - ) -> Web3ProxyResult> { + pub async fn rank_rpcs(&mut self, web3_rpcs: &Web3Rpcs) -> Web3ProxyResult> { self.update_tiers().await?; let minmax_block = self