Struct finality_grandpa::voter::report::RoundState
source · 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 moresource§impl<Id: PartialEq + Eq + Hash> PartialEq<RoundState<Id>> for RoundState<Id>
impl<Id: PartialEq + Eq + Hash> PartialEq<RoundState<Id>> for RoundState<Id>
source§fn eq(&self, other: &RoundState<Id>) -> bool
fn eq(&self, other: &RoundState<Id>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.