From 3b61e009f8e693b3a491ac6b84dac42fa805405d Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Thu, 2 Mar 2023 17:50:20 -0800 Subject: [PATCH] group cfgs --- web3_proxy/src/bin/web3_proxy_cli/main.rs | 6 +----- web3_proxy/src/rpcs/consensus.rs | 7 ++++--- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/web3_proxy/src/bin/web3_proxy_cli/main.rs b/web3_proxy/src/bin/web3_proxy_cli/main.rs index 966fbbc3..82c95655 100644 --- a/web3_proxy/src/bin/web3_proxy_cli/main.rs +++ b/web3_proxy/src/bin/web3_proxy_cli/main.rs @@ -37,11 +37,7 @@ use web3_proxy::{ }; #[cfg(feature = "deadlock")] -use parking_lot::deadlock; -#[cfg(feature = "deadlock")] -use std::thread; -#[cfg(feature = "deadlock")] -use tokio::time::Duration; +use {parking_lot::deadlock, std::thread, tokio::time::Duration}; #[derive(Debug, FromArgs)] /// Command line interface for admins to interact with web3_proxy diff --git a/web3_proxy/src/rpcs/consensus.rs b/web3_proxy/src/rpcs/consensus.rs index 8625f53b..5c6bf79e 100644 --- a/web3_proxy/src/rpcs/consensus.rs +++ b/web3_proxy/src/rpcs/consensus.rs @@ -341,9 +341,10 @@ impl ConnectionsGroup { .collect(); #[cfg(debug_assertions)] - let _ = maybe_head_block.hash(); - #[cfg(debug_assertions)] - let _ = maybe_head_block.number(); + { + let _ = maybe_head_block.hash(); + let _ = maybe_head_block.number(); + } Ok(ConsensusWeb3Rpcs { tier: *tier,