From 78a2119c074df86244bdbadd9a76e6d9a1ef7c29 Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Mon, 5 Dec 2022 16:55:18 -0800 Subject: [PATCH] quieter syncing nodes --- web3_proxy/src/rpcs/blockchain.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web3_proxy/src/rpcs/blockchain.rs b/web3_proxy/src/rpcs/blockchain.rs index 05a681a4..ff350bed 100644 --- a/web3_proxy/src/rpcs/blockchain.rs +++ b/web3_proxy/src/rpcs/blockchain.rs @@ -316,6 +316,9 @@ impl Web3Connections { if rpc_head_block.syncing() { if connection_heads.remove(&rpc.name).is_some() { warn!("{} is behind by {} seconds", &rpc.name, rpc_head_block.lag); + } else { + // we didn't remove anything and this block is old. exit early + return Ok(()); }; None @@ -336,7 +339,6 @@ impl Web3Connections { } } None => { - // TODO: warn is too verbose. this is expected if a node disconnects and has to reconnect // // trace!(%rpc, "Block without number or hash!"); if connection_heads.remove(&rpc.name).is_none() {