mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat(mev): Enable mev_ namespace. (#14457)
This commit is contained in:
@ -247,6 +247,7 @@ pub use eth::EthHandlers;
|
||||
// Rpc server metrics
|
||||
mod metrics;
|
||||
pub use metrics::{MeteredRequestFuture, RpcRequestMetricsService};
|
||||
use reth_rpc::eth::sim_bundle::EthSimBundle;
|
||||
|
||||
// Rpc rate limiter
|
||||
pub mod rate_limiter;
|
||||
@ -1338,6 +1339,11 @@ where
|
||||
// TODO: can we get rid of this here?
|
||||
RethRpcModule::Flashbots => Default::default(),
|
||||
RethRpcModule::Miner => MinerApi::default().into_rpc().into(),
|
||||
RethRpcModule::Mev => {
|
||||
EthSimBundle::new(eth_api.clone(), self.blocking_pool_guard.clone())
|
||||
.into_rpc()
|
||||
.into()
|
||||
}
|
||||
})
|
||||
.clone()
|
||||
})
|
||||
|
||||
@ -271,6 +271,8 @@ pub enum RethRpcModule {
|
||||
Flashbots,
|
||||
/// `miner_` module
|
||||
Miner,
|
||||
/// `mev_` module
|
||||
Mev,
|
||||
}
|
||||
|
||||
// === impl RethRpcModule ===
|
||||
@ -321,6 +323,7 @@ impl FromStr for RethRpcModule {
|
||||
"ots" => Self::Ots,
|
||||
"flashbots" => Self::Flashbots,
|
||||
"miner" => Self::Miner,
|
||||
"mev" => Self::Mev,
|
||||
_ => return Err(ParseError::VariantNotFound),
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user