lower log level
This commit is contained in:
parent
d6f29836c6
commit
ed7e3b4b95
@ -279,6 +279,7 @@ pub struct ActiveRequestHandle(Arc<Web3Connection>);
|
|||||||
|
|
||||||
impl ActiveRequestHandle {
|
impl ActiveRequestHandle {
|
||||||
fn new(connection: Arc<Web3Connection>) -> Self {
|
fn new(connection: Arc<Web3Connection>) -> Self {
|
||||||
|
// TODO: attach the incoming id to this? will be helpful for logging
|
||||||
// TODO: what ordering?!
|
// TODO: what ordering?!
|
||||||
connection
|
connection
|
||||||
.active_requests
|
.active_requests
|
||||||
@ -297,7 +298,7 @@ impl ActiveRequestHandle {
|
|||||||
) -> Result<Box<RawValue>, ethers::prelude::ProviderError> {
|
) -> Result<Box<RawValue>, ethers::prelude::ProviderError> {
|
||||||
// TODO: this should probably be trace level and use a span
|
// TODO: this should probably be trace level and use a span
|
||||||
// TODO: it would be nice to have the request id on this
|
// 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 {
|
let response = match &self.0.provider {
|
||||||
Web3Provider::Http(provider) => provider.request(method, params).await,
|
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: i think ethers already has trace logging (and does it much more fancy)
|
||||||
// TODO: at least instrument this with more useful information
|
// TODO: at least instrument this with more useful information
|
||||||
info!("Response from {}: {:?}", self.0, response);
|
trace!("Response from {}: {:?}", self.0, response);
|
||||||
|
|
||||||
response
|
response
|
||||||
}
|
}
|
||||||
|
@ -113,11 +113,9 @@ impl Web3Connections {
|
|||||||
method: &str,
|
method: &str,
|
||||||
params: &RawValue,
|
params: &RawValue,
|
||||||
) -> Result<Box<RawValue>, ethers::prelude::ProviderError> {
|
) -> Result<Box<RawValue>, ethers::prelude::ProviderError> {
|
||||||
// connection.in_active_requests was called when this rpc was selected
|
|
||||||
|
|
||||||
let response = connection_handle.request(method, params).await;
|
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
|
response
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user