reth_storage_api

Trait 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§