Struct chain_impl_mockchain::leadership::genesis::LeadershipData
source · pub struct LeadershipData {
epoch_nonce: PraosNonce,
nodes: PoolsState,
distribution: StakeDistribution,
epoch: Epoch,
active_slots_coeff: ActiveSlotsCoeff,
}
Expand description
Genesis Praos leadership data for a specific epoch
Fields§
§epoch_nonce: PraosNonce
§nodes: PoolsState
§distribution: StakeDistribution
§epoch: Epoch
§active_slots_coeff: ActiveSlotsCoeff
Implementations§
source§impl LeadershipData
impl LeadershipData
pub fn new( epoch: Epoch, distribution: StakeDistribution, nodes: PoolsState, epoch_nonce: PraosNonce, active_slots_coeff: ActiveSlotsCoeff ) -> Self
pub fn distribution(&self) -> &StakeDistribution
pub fn nodes(&self) -> &PoolsState
pub fn leader( &self, pool_id: &PoolId, vrf_key: &SecretKey<RistrettoGroup2HashDh>, date: BlockDate ) -> Result<Option<Witness>, Error>
pub(crate) fn verify(&self, block_header: &Header) -> Verification
Auto Trait Implementations§
impl RefUnwindSafe for LeadershipData
impl Send for LeadershipData
impl Sync for LeadershipData
impl Unpin for LeadershipData
impl UnwindSafe for LeadershipData
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