Skip to main content

NonEpochMembershipSnapshot

Trait NonEpochMembershipSnapshot 

Source
pub trait NonEpochMembershipSnapshot<T: NodeType>:
    Clone
    + Send
    + Sync {
    type Error: Error + Send + Sync + 'static;

Show 18 methods // Required methods fn stake_table( &self, ) -> impl ExactSizeIterator<Item = &PeerConfig<T>> + Send + '_; fn da_stake_table( &self, ) -> impl ExactSizeIterator<Item = &PeerConfig<T>> + Send + '_; fn committee_members( &self, view: ViewNumber, ) -> impl ExactSizeIterator<Item = &T::SignatureKey> + Send + '_; fn da_committee_members( &self, view: ViewNumber, ) -> impl ExactSizeIterator<Item = &T::SignatureKey> + Send + '_; fn stake(&self, key: &T::SignatureKey) -> Option<PeerConfig<T>>; fn da_stake(&self, key: &T::SignatureKey) -> Option<PeerConfig<T>>; fn has_stake(&self, key: &T::SignatureKey) -> bool; fn has_da_stake(&self, key: &T::SignatureKey) -> bool; fn lookup_leader( &self, view: ViewNumber, ) -> Result<T::SignatureKey, Self::Error>; // Provided methods fn total_nodes(&self) -> usize { ... } fn da_total_nodes(&self) -> usize { ... } fn total_stake(&self) -> U256 { ... } fn total_da_stake(&self) -> U256 { ... } fn success_threshold(&self) -> U256 { ... } fn da_success_threshold(&self) -> U256 { ... } fn failure_threshold(&self) -> U256 { ... } fn upgrade_threshold(&self) -> U256 { ... } fn leader(&self, view: ViewNumber) -> Result<T::SignatureKey> { ... }
}
Expand description

A consistent view of the pre-epoch Membership state.

Used when consensus is operating before epochs are enabled (the epoch == None path in the legacy API).

Required Associated Types§

Source

type Error: Error + Send + Sync + 'static

Required Methods§

Source

fn stake_table( &self, ) -> impl ExactSizeIterator<Item = &PeerConfig<T>> + Send + '_

Source

fn da_stake_table( &self, ) -> impl ExactSizeIterator<Item = &PeerConfig<T>> + Send + '_

Source

fn committee_members( &self, view: ViewNumber, ) -> impl ExactSizeIterator<Item = &T::SignatureKey> + Send + '_

Source

fn da_committee_members( &self, view: ViewNumber, ) -> impl ExactSizeIterator<Item = &T::SignatureKey> + Send + '_

Source

fn stake(&self, key: &T::SignatureKey) -> Option<PeerConfig<T>>

Source

fn da_stake(&self, key: &T::SignatureKey) -> Option<PeerConfig<T>>

Source

fn has_stake(&self, key: &T::SignatureKey) -> bool

Source

fn has_da_stake(&self, key: &T::SignatureKey) -> bool

Source

fn lookup_leader( &self, view: ViewNumber, ) -> Result<T::SignatureKey, Self::Error>

Provided Methods§

Source

fn total_nodes(&self) -> usize

Source

fn da_total_nodes(&self) -> usize

Source

fn total_stake(&self) -> U256

Source

fn total_da_stake(&self) -> U256

Source

fn success_threshold(&self) -> U256

Source

fn da_success_threshold(&self) -> U256

Source

fn failure_threshold(&self) -> U256

Source

fn upgrade_threshold(&self) -> U256

Source

fn leader(&self, view: ViewNumber) -> Result<T::SignatureKey>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§