reth_provider/traits/
block.rs

1use alloy_primitives::BlockNumber;
2use reth_execution_types::ExecutionOutcome;
3use reth_storage_errors::provider::ProviderResult;
4
5/// This just receives state, or [`ExecutionOutcome`], from the provider
6#[auto_impl::auto_impl(&, Arc, Box)]
7pub trait StateReader: Send + Sync {
8    /// Receipt type in [`ExecutionOutcome`].
9    type Receipt: Send + Sync;
10
11    /// Get the [`ExecutionOutcome`] for the given block
12    fn get_state(
13        &self,
14        block: BlockNumber,
15    ) -> ProviderResult<Option<ExecutionOutcome<Self::Receipt>>>;
16}