From b205b2e863c7127c116de53019ffb20e523f5da9 Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Fri, 13 Oct 2023 20:21:58 -0700 Subject: [PATCH] an error here is unexpected. figure out why its happening --- web3_proxy_cli/tests/test_proxy.rs | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/web3_proxy_cli/tests/test_proxy.rs b/web3_proxy_cli/tests/test_proxy.rs index 6beec325..d716500c 100644 --- a/web3_proxy_cli/tests/test_proxy.rs +++ b/web3_proxy_cli/tests/test_proxy.rs @@ -82,22 +82,27 @@ async fn it_starts_and_stops() { for _ in 0..10 { // TODO: we currently give a 502 here when we should give a `None` - if let Ok(x) = proxy_provider + match proxy_provider .request::<_, Option>("eth_getBlockByNumber", ("latest", false)) .await { - proxy_result = x; + Ok(x) => { + proxy_result = x; - if let Some(ref proxy_result) = proxy_result { - if proxy_result.number == Some(second_block_num) { - break; + if let Some(ref proxy_result) = proxy_result { + if proxy_result.number == Some(second_block_num) { + break; + } } + + warn!(?proxy_result, ?second_block_num); + + sleep(Duration::from_millis(100)).await; + } + Err(err) => { + panic!("{:?}", err); } } - - warn!(?proxy_result, ?second_block_num); - - sleep(Duration::from_millis(100)).await; } assert_eq!(Some(anvil_result), proxy_result);