Trait BlockchainTreePendingStateProvider
pub trait BlockchainTreePendingStateProvider: Send + Sync {
// Required method
fn find_pending_state_provider(
&self,
block_hash: FixedBytes<32>,
) -> Option<Box<dyn FullExecutionDataProvider>>;
// Provided method
fn pending_state_provider(
&self,
block_hash: FixedBytes<32>,
) -> Result<Box<dyn FullExecutionDataProvider>, ProviderError> { ... }
}
Expand description
Blockchain trait provider that gives access to the blockchain state that is not yet committed (pending).
Required Methods§
fn find_pending_state_provider(
&self,
block_hash: FixedBytes<32>,
) -> Option<Box<dyn FullExecutionDataProvider>>
fn find_pending_state_provider( &self, block_hash: FixedBytes<32>, ) -> Option<Box<dyn FullExecutionDataProvider>>
Returns state provider if a matching block exists.
Provided Methods§
fn pending_state_provider(
&self,
block_hash: FixedBytes<32>,
) -> Result<Box<dyn FullExecutionDataProvider>, ProviderError>
fn pending_state_provider( &self, block_hash: FixedBytes<32>, ) -> Result<Box<dyn FullExecutionDataProvider>, ProviderError>
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.