Trait reth_storage_api::ExecutionDataProvider

source ·
pub trait ExecutionDataProvider: Send + Sync {
    // Required methods
    fn execution_outcome(&self) -> &ExecutionOutcome;
    fn block_hash(&self, block_number: BlockNumber) -> Option<BlockHash>;
}
Expand description

Provides data required for post-block execution.

This trait offers methods to access essential post-execution data, including the state changes in accounts and storage, as well as block hashes for both the pending and canonical chains.

The trait includes:

  • [ExecutionOutcome] - Captures all account and storage changes in the pending chain.
  • Block hashes - Provides access to the block hashes of both the pending chain and canonical blocks.

Required Methods§

source

fn execution_outcome(&self) -> &ExecutionOutcome

Return the execution outcome.

source

fn block_hash(&self, block_number: BlockNumber) -> Option<BlockHash>

Return block hash by block number of pending or canonical chain.

Implementations on Foreign Types§

source§

impl ExecutionDataProvider for ExecutionOutcome

source§

fn block_hash(&self, _block_number: BlockNumber) -> Option<BlockHash>

Always returns None because we don’t have any information about the block header.

source§

fn execution_outcome(&self) -> &ExecutionOutcome

source§

impl<'a, T: 'a + ExecutionDataProvider + ?Sized> ExecutionDataProvider for &'a T
where &'a T: Send + Sync,

source§

fn execution_outcome(&self) -> &ExecutionOutcome

source§

fn block_hash(&self, block_number: BlockNumber) -> Option<BlockHash>

source§

impl<T: ExecutionDataProvider + ?Sized> ExecutionDataProvider for Box<T>
where Box<T>: Send + Sync,

source§

fn execution_outcome(&self) -> &ExecutionOutcome

source§

fn block_hash(&self, block_number: BlockNumber) -> Option<BlockHash>

Implementors§