From e7baeb1ba48e642e4f0403542d142b04d9387735 Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Sat, 24 Jun 2023 21:41:18 -0700 Subject: [PATCH] rearrange so maybe time works better --- web3_proxy/src/bin/web3_proxy_cli/proxyd.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/web3_proxy/src/bin/web3_proxy_cli/proxyd.rs b/web3_proxy/src/bin/web3_proxy_cli/proxyd.rs index 3bc0d12f..8a673c59 100644 --- a/web3_proxy/src/bin/web3_proxy_cli/proxyd.rs +++ b/web3_proxy/src/bin/web3_proxy_cli/proxyd.rs @@ -398,7 +398,6 @@ mod tests { #[test_log::test(tokio::test)] async fn it_works() { - // TODO: move basic setup into a test fixture let x = TestApp::spawn().await; let anvil_provider = &x.anvil_provider; @@ -434,6 +433,11 @@ mod tests { .await .unwrap() .unwrap(); + + let second_block_num = anvil_result.number.unwrap(); + + assert_eq!(first_block_num, second_block_num - 1); + let proxy_result = proxy_provider .request::<_, Option>("eth_getBlockByNumber", ("latest", false)) .await @@ -442,10 +446,6 @@ mod tests { assert_eq!(anvil_result, proxy_result); - let second_block_num = anvil_result.number.unwrap(); - - assert_eq!(first_block_num, second_block_num - 1); - x.wait().await; } }