From ed7e3b4b95001d2c80d86eab617f9d062e21adc3 Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Sat, 7 May 2022 06:13:57 +0000 Subject: [PATCH] lower log level --- web3-proxy/src/connection.rs | 5 +++-- web3-proxy/src/connections.rs | 4 +--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/web3-proxy/src/connection.rs b/web3-proxy/src/connection.rs index e4b1175c..260d59e9 100644 --- a/web3-proxy/src/connection.rs +++ b/web3-proxy/src/connection.rs @@ -279,6 +279,7 @@ pub struct ActiveRequestHandle(Arc); impl ActiveRequestHandle { fn new(connection: Arc) -> Self { + // TODO: attach the incoming id to this? will be helpful for logging // TODO: what ordering?! connection .active_requests @@ -297,7 +298,7 @@ impl ActiveRequestHandle { ) -> Result, ethers::prelude::ProviderError> { // TODO: this should probably be trace level and use a span // TODO: it would be nice to have the request id on this - info!("Sending {}({}) to {}", method, params.to_string(), self.0); + trace!("Sending {}({}) to {}", method, params.to_string(), self.0); let response = match &self.0.provider { Web3Provider::Http(provider) => provider.request(method, params).await, @@ -306,7 +307,7 @@ impl ActiveRequestHandle { // TODO: i think ethers already has trace logging (and does it much more fancy) // TODO: at least instrument this with more useful information - info!("Response from {}: {:?}", self.0, response); + trace!("Response from {}: {:?}", self.0, response); response } diff --git a/web3-proxy/src/connections.rs b/web3-proxy/src/connections.rs index 0e68f7fe..d66d5131 100644 --- a/web3-proxy/src/connections.rs +++ b/web3-proxy/src/connections.rs @@ -113,11 +113,9 @@ impl Web3Connections { method: &str, params: &RawValue, ) -> Result, ethers::prelude::ProviderError> { - // connection.in_active_requests was called when this rpc was selected - let response = connection_handle.request(method, params).await; - // TODO: if "no block with that header" or some other jsonrpc errors, skip this response + // TODO: if "no block with that header" or some other jsonrpc errors, skip this response? response }