From 7cb07cc49f4b12fc3f3af8240e342e3f1b239f3a Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Sat, 27 May 2023 01:53:49 -0700 Subject: [PATCH] debug -> trace for some verbose logs --- web3_proxy/src/rpcs/consensus.rs | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/web3_proxy/src/rpcs/consensus.rs b/web3_proxy/src/rpcs/consensus.rs index b7237ccb..2b1103bc 100644 --- a/web3_proxy/src/rpcs/consensus.rs +++ b/web3_proxy/src/rpcs/consensus.rs @@ -138,7 +138,7 @@ impl ConsensusWeb3Rpcs { let head_num = self.head_block.number(); if Some(head_num) >= needed_block_num { - debug!("best (head) block: {}", head_num); + trace!("best (head) block: {}", head_num); return ShouldWaitForBlock::Ready; } } @@ -153,15 +153,14 @@ impl ConsensusWeb3Rpcs { .iter() .any(|rpc| self.rpc_will_work_eventually(rpc, needed_block_num, skip_rpcs)) { - // TODO: too verbose - debug!("everything in this ranking ({:?}) is skipped", next_ranking); + trace!("everything in this ranking ({:?}) is skipped", next_ranking); continue; } let next_head_num = next_ranking.head_num.as_ref(); if next_head_num >= needed_block_num { - debug!("best (head) block: {:?}", next_head_num); + trace!("best (head) block: {:?}", next_head_num); return ShouldWaitForBlock::Ready; } @@ -170,14 +169,12 @@ impl ConsensusWeb3Rpcs { // TODO: this seems wrong if best_num.is_some() { - // TODO: too verbose - debug!("best (old) block: {:?}", best_num); + trace!("best (old) block: {:?}", best_num); ShouldWaitForBlock::Wait { current: best_num.copied(), } } else { - // TODO: too verbose - debug!("never ready"); + trace!("never ready"); ShouldWaitForBlock::NeverReady } } @@ -206,16 +203,16 @@ impl ConsensusWeb3Rpcs { if let Some(rpc_data) = self.rpc_data.get(rpc) { match rpc_data.head_block_num.cmp(needed_block_num) { Ordering::Less => { - debug!("{} is behind. let it catch up", rpc); + trace!("{} is behind. let it catch up", rpc); return true; } Ordering::Greater | Ordering::Equal => { // rpc is synced past the needed block. make sure the block isn't too old for it if self.has_block_data(rpc, needed_block_num) { - debug!("{} has {}", rpc, needed_block_num); + trace!("{} has {}", rpc, needed_block_num); return true; } else { - debug!("{} does not have {}", rpc, needed_block_num); + trace!("{} does not have {}", rpc, needed_block_num); return false; } }