pub struct BlockHeaderBeaconChainParameters<'a> {
pub fixed_parameters: BlockHeaderFixedConsensusParameters,
pub super_segment_root: Option<&'a SuperSegmentRoot>,
pub next_solution_range: Option<SolutionRange>,
pub pot_parameters_change: Option<&'a BlockHeaderPotParametersChange>,
}
Expand description
Consensus parameters (on the beacon chain)
Fields§
§fixed_parameters: BlockHeaderFixedConsensusParameters
Consensus parameters that are always present
super_segment_root: Option<&'a SuperSegmentRoot>
Super segment root
next_solution_range: Option<SolutionRange>
Solution range for the next block/era (if any)
pot_parameters_change: Option<&'a BlockHeaderPotParametersChange>
Change of parameters to apply to the proof of time chain (if any)
Implementations§
Source§impl<'a> BlockHeaderBeaconChainParameters<'a>
impl<'a> BlockHeaderBeaconChainParameters<'a>
Sourcepub const SUPER_SEGMENT_ROOT_MASK: u8 = 1u8
pub const SUPER_SEGMENT_ROOT_MASK: u8 = 1u8
Bitmask for presence of super_segment_root
field
Sourcepub const NEXT_SOLUTION_RANGE_MASK: u8 = 2u8
pub const NEXT_SOLUTION_RANGE_MASK: u8 = 2u8
Bitmask for presence of next_solution_range
field
Sourcepub const POT_PARAMETERS_CHANGE_MASK: u8 = 4u8
pub const POT_PARAMETERS_CHANGE_MASK: u8 = 4u8
Bitmask for presence of pot_parameters_change
field
Sourcepub fn try_from_bytes(bytes: &'a [u8]) -> Option<(Self, &'a [u8])>
pub fn try_from_bytes(bytes: &'a [u8]) -> Option<(Self, &'a [u8])>
Create an instance from provided bytes.
bytes
do not need to be aligned.
Returns an instance and remaining bytes on success.
Sourcepub fn hash(&self) -> Blake3Hash
pub fn hash(&self) -> Blake3Hash
Hash of the block consensus parameters, part of the eventual block root
Trait Implementations§
Source§impl<'a> Clone for BlockHeaderBeaconChainParameters<'a>
impl<'a> Clone for BlockHeaderBeaconChainParameters<'a>
Source§fn clone(&self) -> BlockHeaderBeaconChainParameters<'a>
fn clone(&self) -> BlockHeaderBeaconChainParameters<'a>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'a> Debug for BlockHeaderBeaconChainParameters<'a>
impl<'a> Debug for BlockHeaderBeaconChainParameters<'a>
impl<'a> Copy for BlockHeaderBeaconChainParameters<'a>
Auto Trait Implementations§
impl<'a> Freeze for BlockHeaderBeaconChainParameters<'a>
impl<'a> RefUnwindSafe for BlockHeaderBeaconChainParameters<'a>
impl<'a> Send for BlockHeaderBeaconChainParameters<'a>
impl<'a> Sync for BlockHeaderBeaconChainParameters<'a>
impl<'a> Unpin for BlockHeaderBeaconChainParameters<'a>
impl<'a> UnwindSafe for BlockHeaderBeaconChainParameters<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more