Trait TestHeader
pub trait TestHeader {
// Required methods
fn set_parent_hash(&mut self, hash: FixedBytes<32>);
fn set_block_number(&mut self, number: u64);
fn set_state_root(&mut self, state_root: FixedBytes<32>);
fn set_difficulty(&mut self, difficulty: Uint<256, 4>);
}
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§
fn set_parent_hash(&mut self, hash: FixedBytes<32>)
fn set_parent_hash(&mut self, hash: FixedBytes<32>)
Updates the parent block hash.
fn set_block_number(&mut self, number: u64)
fn set_block_number(&mut self, number: u64)
Updates the block number.
fn set_state_root(&mut self, state_root: FixedBytes<32>)
fn set_state_root(&mut self, state_root: FixedBytes<32>)
Updates the block state root.
fn set_difficulty(&mut self, difficulty: Uint<256, 4>)
fn set_difficulty(&mut self, difficulty: Uint<256, 4>)
Updates the block difficulty.