pub struct RoundState<Id: Eq + Hash> {
pub total_weight: VoterWeight,
pub threshold_weight: VoterWeight,
pub prevote_current_weight: VoteWeight,
pub prevote_ids: HashSet<Id>,
pub precommit_current_weight: VoteWeight,
pub precommit_ids: HashSet<Id>,
}
Expand description
Basic data struct for the state of a round.
Fields§
§total_weight: VoterWeight
Total weight of all votes.
threshold_weight: VoterWeight
The threshold voter weight.
prevote_current_weight: VoteWeight
Current weight of the prevotes.
prevote_ids: HashSet<Id>
The identities of nodes that have cast prevotes so far.
precommit_current_weight: VoteWeight
Current weight of the precommits.
precommit_ids: HashSet<Id>
The identities of nodes that have cast precommits so far.
Trait Implementations§
Source§impl<Id: Clone + Eq + Hash> Clone for RoundState<Id>
impl<Id: Clone + Eq + Hash> Clone for RoundState<Id>
Source§fn clone(&self) -> RoundState<Id>
fn clone(&self) -> RoundState<Id>
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 moreimpl<Id: Eq + Eq + Hash> Eq for RoundState<Id>
impl<Id: Eq + Hash> StructuralPartialEq for RoundState<Id>
Auto Trait Implementations§
impl<Id> Freeze for RoundState<Id>
impl<Id> RefUnwindSafe for RoundState<Id>where
Id: RefUnwindSafe,
impl<Id> Send for RoundState<Id>where
Id: Send,
impl<Id> Sync for RoundState<Id>where
Id: Sync,
impl<Id> Unpin for RoundState<Id>where
Id: Unpin,
impl<Id> UnwindSafe for RoundState<Id>where
Id: UnwindSafe,
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