add more to Web3Rpcs debug

This commit is contained in:
Bryan Stitt 2023-07-10 15:31:10 -07:00
parent a7f1c043c5
commit e80d1bd23a

@ -1181,8 +1181,10 @@ impl Web3Rpcs {
} }
Err(None) => { Err(None) => {
warn!( warn!(
"No servers in sync on {:?} (block {:?} - {:?})! Retrying", ?self,
self, min_block_needed, max_block_needed ?min_block_needed,
?max_block_needed,
"No servers in sync on! Retrying",
); );
if let Some(request_metadata) = &request_metadata { if let Some(request_metadata) = &request_metadata {
@ -1286,8 +1288,13 @@ impl Display for Web3Rpcs {
impl fmt::Debug for Web3Rpcs { impl fmt::Debug for Web3Rpcs {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
// TODO: the default formatter takes forever to write. this is too quiet though // TODO: the default formatter takes forever to write. this is too quiet though
self.by_name.sync();
let consensus_rpcs = self.watch_ranked_rpcs.borrow().is_some();
f.debug_struct("Web3Rpcs") f.debug_struct("Web3Rpcs")
.field("rpcs", &self.by_name) .field("rpcs", &self.by_name)
.field("consensus_rpcs", &consensus_rpcs)
.finish_non_exhaustive() .finish_non_exhaustive()
} }
} }