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§
Sourcefn execution_outcome(&self) -> &ExecutionOutcome
fn execution_outcome(&self) -> &ExecutionOutcome
Return the execution outcome.
Sourcefn block_hash(&self, block_number: BlockNumber) -> Option<BlockHash>
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
impl ExecutionDataProvider for ExecutionOutcome
Source§fn block_hash(&self, _block_number: BlockNumber) -> Option<BlockHash>
fn block_hash(&self, _block_number: BlockNumber) -> Option<BlockHash>
Always returns None because we don’t have any information about the block header.