Skip to content

Commit

Permalink
chore: rm fqs for NodeCore (paradigmxyz#12418)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsse authored Nov 9, 2024
1 parent f86efcc commit 7a65cce
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 14 deletions.
8 changes: 4 additions & 4 deletions crates/rpc/rpc/src/debug.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ use reth_revm::database::StateProviderDatabase;
use reth_rpc_api::DebugApiServer;
use reth_rpc_eth_api::{
helpers::{EthApiSpec, EthTransactions, TraceExt},
EthApiTypes, FromEthApiError, RpcNodeCore,
EthApiTypes, FromEthApiError,
};
use reth_rpc_eth_types::{EthApiError, StateCacheDb};
use reth_rpc_server_types::{result::internal_rpc_err, ToRpcResult};
Expand Down Expand Up @@ -115,7 +115,7 @@ where
env: Env::boxed(
cfg.cfg_env.clone(),
block_env.clone(),
RpcNodeCore::evm_config(this.eth_api()).tx_env(tx, *signer),
this.eth_api().evm_config().tx_env(tx, *signer),
),
handler_cfg: cfg.handler_cfg,
};
Expand Down Expand Up @@ -264,7 +264,7 @@ where
env: Env::boxed(
cfg.cfg_env.clone(),
block_env,
RpcNodeCore::evm_config(this.eth_api()).tx_env(tx.as_signed(), tx.signer()),
this.eth_api().evm_config().tx_env(tx.as_signed(), tx.signer()),
),
handler_cfg: cfg.handler_cfg,
};
Expand Down Expand Up @@ -533,7 +533,7 @@ where
env: Env::boxed(
cfg.cfg_env.clone(),
block_env.clone(),
RpcNodeCore::evm_config(this.eth_api()).tx_env(tx, *signer),
this.eth_api().evm_config().tx_env(tx, *signer),
),
handler_cfg: cfg.handler_cfg,
};
Expand Down
4 changes: 2 additions & 2 deletions crates/rpc/rpc/src/eth/bundle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ where
let mut total_gas_fess = U256::ZERO;
let mut hasher = Keccak256::new();

let mut evm = RpcNodeCore::evm_config(&eth_api).evm_with_env(db, env);
let mut evm = eth_api.evm_config().evm_with_env(db, env);

let mut results = Vec::with_capacity(transactions.len());
let mut transactions = transactions.into_iter().peekable();
Expand All @@ -188,7 +188,7 @@ where
.effective_tip_per_gas(basefee)
.ok_or_else(|| RpcInvalidTransactionError::FeeCapTooLow)
.map_err(Eth::Error::from_eth_err)?;
RpcNodeCore::evm_config(&eth_api).fill_tx_env(evm.tx_mut(), &tx, signer);
eth_api.evm_config().fill_tx_env(evm.tx_mut(), &tx, signer);
let ResultAndState { result, state } =
evm.transact().map_err(Eth::Error::from_evm_err)?;

Expand Down
8 changes: 2 additions & 6 deletions crates/rpc/rpc/src/eth/sim_bundle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ where
let mut refundable_value = U256::ZERO;
let mut body_logs: Vec<SimBundleLogs> = Vec::new();

let mut evm = RpcNodeCore::evm_config(&eth_api).evm_with_env(db, env);
let mut evm = eth_api.evm_config().evm_with_env(db, env);

for item in &flattened_bundle {
// Check inclusion constraints
Expand All @@ -323,11 +323,7 @@ where
)
.into());
}
RpcNodeCore::evm_config(&eth_api).fill_tx_env(
evm.tx_mut(),
&item.tx,
item.signer,
);
eth_api.evm_config().fill_tx_env(evm.tx_mut(), &item.tx, item.signer);

let ResultAndState { result, state } =
evm.transact().map_err(EthApiError::from_eth_err)?;
Expand Down
4 changes: 2 additions & 2 deletions crates/rpc/rpc/src/trace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ use reth_primitives::Header;
use reth_provider::{BlockReader, ChainSpecProvider, EvmEnvProvider, StateProviderFactory};
use reth_revm::database::StateProviderDatabase;
use reth_rpc_api::TraceApiServer;
use reth_rpc_eth_api::{helpers::TraceExt, FromEthApiError, RpcNodeCore};
use reth_rpc_eth_api::{helpers::TraceExt, FromEthApiError};
use reth_rpc_eth_types::{error::EthApiError, utils::recover_raw_transaction};
use reth_tasks::pool::BlockingTaskGuard;
use revm::{
Expand Down Expand Up @@ -122,7 +122,7 @@ where
let env = EnvWithHandlerCfg::new_with_cfg_env(
cfg,
block,
RpcNodeCore::evm_config(self.eth_api()).tx_env(tx.as_signed(), tx.signer()),
self.eth_api().evm_config().tx_env(tx.as_signed(), tx.signer()),
);

let config = TracingInspectorConfig::from_parity_config(&trace_types);
Expand Down

0 comments on commit 7a65cce

Please sign in to comment.