diff --git a/crates/storage/provider/src/test_utils/mock.rs b/crates/storage/provider/src/test_utils/mock.rs index f706e62c11..aa756f1951 100644 --- a/crates/storage/provider/src/test_utils/mock.rs +++ b/crates/storage/provider/src/test_utils/mock.rs @@ -659,39 +659,6 @@ impl StateProviderFactory for MockEthProvider { } } -impl StateProviderFactory for Arc { - fn latest(&self) -> ProviderResult { - Ok(Box::new(self.clone())) - } - - fn history_by_block_number(&self, _block: BlockNumber) -> ProviderResult { - Ok(Box::new(self.clone())) - } - - fn history_by_block_hash(&self, _block: BlockHash) -> ProviderResult { - Ok(Box::new(self.clone())) - } - - fn state_by_block_hash(&self, _block: BlockHash) -> ProviderResult { - Ok(Box::new(self.clone())) - } - - fn pending(&self) -> ProviderResult { - Ok(Box::new(self.clone())) - } - - fn pending_state_by_hash(&self, _block_hash: B256) -> ProviderResult> { - Ok(Some(Box::new(self.clone()))) - } - - fn pending_with_provider<'a>( - &'a self, - _bundle_state_data: Box, - ) -> ProviderResult { - Ok(Box::new(self.clone())) - } -} - impl WithdrawalsProvider for MockEthProvider { fn withdrawals_by_block( &self, diff --git a/crates/storage/provider/src/traits/state.rs b/crates/storage/provider/src/traits/state.rs index 3cef4c7bcc..b5251ca75c 100644 --- a/crates/storage/provider/src/traits/state.rs +++ b/crates/storage/provider/src/traits/state.rs @@ -97,6 +97,7 @@ pub trait StateProvider: BlockHashReader + AccountReader + StateRootProvider + S /// This affects tracing, or replaying blocks, which will need to be executed on top of the state of /// the parent block. For example, in order to trace block `n`, the state after block `n - 1` needs /// to be used, since block `n` was executed on its parent block's state. +#[auto_impl(&, Arc, Box)] pub trait StateProviderFactory: BlockIdReader + Send + Sync { /// Storage provider for latest block. fn latest(&self) -> ProviderResult;