pub trait TestHeader {
// Required methods
fn set_parent_hash(&mut self, hash: BlockHash);
fn set_block_number(&mut self, number: BlockNumber);
fn set_state_root(&mut self, state_root: B256);
fn set_difficulty(&mut self, difficulty: U256);
}
Available on crate features
test-utils
or arbitrary
only.Expand description
A helper trait for Header
s that allows for mutable access to the headers values.
This allows for modifying the header for testing purposes.
Required Methods§
Sourcefn set_parent_hash(&mut self, hash: BlockHash)
fn set_parent_hash(&mut self, hash: BlockHash)
Updates the parent block hash.
Sourcefn set_block_number(&mut self, number: BlockNumber)
fn set_block_number(&mut self, number: BlockNumber)
Updates the block number.
Sourcefn set_state_root(&mut self, state_root: B256)
fn set_state_root(&mut self, state_root: B256)
Updates the block state root.
Sourcefn set_difficulty(&mut self, difficulty: U256)
fn set_difficulty(&mut self, difficulty: U256)
Updates the block difficulty.