diff --git a/crates/builder/src/task.rs b/crates/builder/src/task.rs index 49cdce3b4..26c9edce6 100644 --- a/crates/builder/src/task.rs +++ b/crates/builder/src/task.rs @@ -250,6 +250,7 @@ where Box::new(self) } + // TODO(danc): Can we DRY these create functions? async fn create_builders_v0_6( &self, ep: &EntryPointBuilderSettings, diff --git a/crates/pool/src/task.rs b/crates/pool/src/task.rs index 3f44a7629..1313cf823 100644 --- a/crates/pool/src/task.rs +++ b/crates/pool/src/task.rs @@ -184,14 +184,15 @@ impl PoolTask { Box::new(self) } - fn create_mempool_v0_7( + // TODO(danc): when safe simulation for 0.7 is implemented, DRY these functions + fn create_mempool_v0_6( chain_spec: ChainSpec, pool_config: &PoolConfig, unsafe_mode: bool, event_sender: broadcast::Sender>, provider: Arc

, ) -> anyhow::Result>> { - let ep = EthersEntryPointV0_7::new(pool_config.entry_point, Arc::clone(&provider)); + let ep = EthersEntryPointV0_6::new(pool_config.entry_point, Arc::clone(&provider)); if unsafe_mode { let simulator = @@ -205,18 +206,34 @@ impl PoolTask { simulator, ) } else { - panic!("V0_7 safe simulation not supported") + let simulate_validation_tracer = + sim_v0_6::SimulateValidationTracerImpl::new(Arc::clone(&provider), ep.clone()); + let simulator = sim_v0_6::Simulator::new( + Arc::clone(&provider), + ep.clone(), + simulate_validation_tracer, + pool_config.sim_settings, + pool_config.mempool_channel_configs.clone(), + ); + Self::create_mempool( + chain_spec, + pool_config, + event_sender, + provider, + ep, + simulator, + ) } } - fn create_mempool_v0_6( + fn create_mempool_v0_7( chain_spec: ChainSpec, pool_config: &PoolConfig, unsafe_mode: bool, event_sender: broadcast::Sender>, provider: Arc

, ) -> anyhow::Result>> { - let ep = EthersEntryPointV0_6::new(pool_config.entry_point, Arc::clone(&provider)); + let ep = EthersEntryPointV0_7::new(pool_config.entry_point, Arc::clone(&provider)); if unsafe_mode { let simulator = @@ -230,23 +247,7 @@ impl PoolTask { simulator, ) } else { - let simulate_validation_tracer = - sim_v0_6::SimulateValidationTracerImpl::new(Arc::clone(&provider), ep.clone()); - let simulator = sim_v0_6::Simulator::new( - Arc::clone(&provider), - ep.clone(), - simulate_validation_tracer, - pool_config.sim_settings, - pool_config.mempool_channel_configs.clone(), - ); - Self::create_mempool( - chain_spec, - pool_config, - event_sender, - provider, - ep, - simulator, - ) + panic!("V0_7 safe simulation not supported") } } diff --git a/crates/rpc/src/eth/router.rs b/crates/rpc/src/eth/router.rs index e4cd325a8..2743762cc 100644 --- a/crates/rpc/src/eth/router.rs +++ b/crates/rpc/src/eth/router.rs @@ -60,7 +60,6 @@ impl EntryPointRouterBuilder { route.version() ); } - tracing::info!("Adding route for v0.7 entry point {:?}", route.address()); self.entry_points.push(route.address()); self.v0_7 = Some((route.address(), Arc::new(Box::new(route))));