From e4cb299f732e5826f68a2c50d03c4a2d6771cbbf Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Fri, 6 May 2022 06:17:33 +0000 Subject: [PATCH] those were possible --- web3-proxy/src/connections.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/web3-proxy/src/connections.rs b/web3-proxy/src/connections.rs index ecb35beb..3204a953 100644 --- a/web3-proxy/src/connections.rs +++ b/web3-proxy/src/connections.rs @@ -223,10 +223,17 @@ impl Web3Connections { return Ok(()); } (cmp::Ordering::Less, cmp::Ordering::Equal) => { - panic!("Less+Equal should be impossible") + // this rpc is behind the best. but is an improvement for the tier + return Ok(()); } (cmp::Ordering::Less, cmp::Ordering::Greater) => { - panic!("Less+greater should be impossible") + // this rpc is behind the best, but it is catching up + synced_connections.inner.clear(); + + synced_connections.head_block_number = new_block; + + // return now because this isn't actually synced + return Ok(()); } (cmp::Ordering::Equal, cmp::Ordering::Greater) => { // we caught up to another tier