From 8d20019b5ad2af5440e00f241eedc82a9f629b77 Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Tue, 24 Oct 2023 23:29:23 -0700 Subject: [PATCH] include the rpc age in the serialized list --- web3_proxy/src/rpcs/many.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/web3_proxy/src/rpcs/many.rs b/web3_proxy/src/rpcs/many.rs index 56864355..8664b136 100644 --- a/web3_proxy/src/rpcs/many.rs +++ b/web3_proxy/src/rpcs/many.rs @@ -629,7 +629,13 @@ impl Serialize for Web3Rpcs { let names: Vec<_> = consensus_rpcs .inner .iter() - .map(|x| x.name.as_str()) + .map(|x| { + format!( + "{} ({}s)", + x.name, + x.created_at.unwrap().elapsed().as_secs_f32() + ) + }) .collect(); state.serialize_field("synced_connections", &names)?;