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§
Sourcefn find_pending_state_provider(
&self,
block_hash: BlockHash,
) -> Option<Box<dyn FullExecutionDataProvider>>
fn find_pending_state_provider( &self, block_hash: BlockHash, ) -> Option<Box<dyn FullExecutionDataProvider>>
Returns state provider if a matching block exists.
Provided Methods§
Sourcefn pending_state_provider(
&self,
block_hash: BlockHash,
) -> ProviderResult<Box<dyn FullExecutionDataProvider>>
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.