@@ -26,7 +26,6 @@ use monad_rpc_docs::rpc;
2626use monad_triedb_utils:: triedb_env:: { BlockKey , FinalizedBlockKey , ProposedBlockKey , Triedb } ;
2727use monad_types:: { BlockId , Hash , SeqNum } ;
2828use serde:: Deserialize ;
29- use tokio:: sync:: Mutex ;
3029use tracing:: trace;
3130
3231use crate :: {
@@ -43,7 +42,7 @@ trait EthCallProvider {
4342 async fn eth_call (
4443 & self ,
4544 txn : TxEnvelope ,
46- eth_call_executor : Option < Arc < Mutex < EthCallExecutor > > > ,
45+ eth_call_executor : Option < Arc < EthCallExecutor > > ,
4746 ) -> CallResult ;
4847}
4948
@@ -80,7 +79,7 @@ impl EthCallProvider for GasEstimator {
8079 async fn eth_call (
8180 & self ,
8281 txn : TxEnvelope ,
83- eth_call_executor : Option < Arc < Mutex < EthCallExecutor > > > ,
82+ eth_call_executor : Option < Arc < EthCallExecutor > > ,
8483 ) -> CallResult {
8584 let ( block_number, block_id) = match self . block_key {
8685 BlockKey :: Finalized ( FinalizedBlockKey ( SeqNum ( n) ) ) => ( n, None ) ,
@@ -111,7 +110,7 @@ impl EthCallProvider for GasEstimator {
111110
112111async fn estimate_gas < T : EthCallProvider > (
113112 provider : & T ,
114- eth_call_executor : Option < Arc < Mutex < EthCallExecutor > > > ,
113+ eth_call_executor : Option < Arc < EthCallExecutor > > ,
115114 call_request : & mut CallRequest ,
116115 original_tx_gas : U256 ,
117116 provider_gas_limit : u64 ,
@@ -231,7 +230,7 @@ pub struct MonadEthEstimateGasParams {
231230/// Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.
232231pub async fn monad_eth_estimateGas < T : Triedb > (
233232 triedb_env : & T ,
234- eth_call_executor : Arc < Mutex < EthCallExecutor > > ,
233+ eth_call_executor : Arc < EthCallExecutor > ,
235234 chain_id : u64 ,
236235 provider_gas_limit : u64 ,
237236 params : MonadEthEstimateGasParams ,
@@ -467,11 +466,7 @@ mod tests {
467466 }
468467
469468 impl EthCallProvider for MockGasEstimator {
470- async fn eth_call (
471- & self ,
472- txn : TxEnvelope ,
473- _: Option < Arc < Mutex < EthCallExecutor > > > ,
474- ) -> CallResult {
469+ async fn eth_call ( & self , txn : TxEnvelope , _: Option < Arc < EthCallExecutor > > ) -> CallResult {
475470 if txn. gas_limit ( ) >= self . gas_used + self . gas_refund {
476471 CallResult :: Success ( SuccessCallResult {
477472 gas_used : self . gas_used ,
0 commit comments