From 61f02b3d0c89d2300f31a2012711d43061b832b2 Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Fri, 13 May 2022 17:43:37 +0000 Subject: [PATCH] more logging --- web3-proxy/src/connections.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/web3-proxy/src/connections.rs b/web3-proxy/src/connections.rs index 29c78588..c3c20f34 100644 --- a/web3-proxy/src/connections.rs +++ b/web3-proxy/src/connections.rs @@ -11,7 +11,7 @@ use std::fmt; use std::sync::atomic::{self, AtomicU64}; use std::sync::Arc; use tokio::sync::RwLock; -use tracing::{debug, info, trace, warn}; +use tracing::{debug, info, trace, warn, instrument}; use crate::config::Web3ConnectionConfig; use crate::connection::{ActiveRequestHandle, Web3Connection}; @@ -174,8 +174,12 @@ impl Web3Connections { } } + /// TODO: possible dead lock here. investigate more. probably refactor + #[instrument] pub async fn update_synced_rpcs(&self, rpc: &Arc) -> anyhow::Result<()> { + info!("Locking synced_connections") let mut synced_connections = self.synced_connections.write().await; + info!("Locked synced_connections") let new_block = rpc.head_block_number();