reth_storage_api

Trait BlockchainTreePendingStateProvider

Source
pub trait BlockchainTreePendingStateProvider: Send + Sync {
    // Required method
    fn find_pending_state_provider(
        &self,
        block_hash: BlockHash,
    ) -> Option<Box<dyn FullExecutionDataProvider>>;

    // Provided method
    fn pending_state_provider(
        &self,
        block_hash: BlockHash,
    ) -> ProviderResult<Box<dyn FullExecutionDataProvider>> { ... }
}
Expand description

Blockchain trait provider that gives access to the blockchain state that is not yet committed (pending).

Required Methods§

Source

fn find_pending_state_provider( &self, block_hash: BlockHash, ) -> Option<Box<dyn FullExecutionDataProvider>>

Returns state provider if a matching block exists.

Provided Methods§

Source

fn pending_state_provider( &self, block_hash: BlockHash, ) -> ProviderResult<Box<dyn FullExecutionDataProvider>>

Returns a state provider that includes all state changes of the given (pending) block hash.

In other words, the state provider will return the state after all transactions of the given hash have been executed.

Implementors§