Kagome
Polkadot Runtime Engine in C++17
kagome::consensus::grandpa::VoteWeight::OneTypeVoteWeight Struct Reference

#include <vote_weight.hpp>

Collaboration diagram for kagome::consensus::grandpa::VoteWeight::OneTypeVoteWeight:

Public Member Functions

void set (size_t index, size_t weight)
 
void unset (size_t index, size_t weight)
 
Weight total (const std::vector< bool > &equivocators, const VoterSet &voter_set) const
 
void merge (const OneTypeVoteWeight &other, const std::shared_ptr< VoterSet > &voter_set)
 
bool operator== (const OneTypeVoteWeight &other) const
 

Public Attributes

std::vector< bool > flags
 
Weight sum = 0
 

Detailed Description

Definition at line 28 of file vote_weight.hpp.

Member Function Documentation

void kagome::consensus::grandpa::VoteWeight::OneTypeVoteWeight::merge ( const OneTypeVoteWeight other,
const std::shared_ptr< VoterSet > &  voter_set 
)
inline

Definition at line 70 of file vote_weight.hpp.

bool kagome::consensus::grandpa::VoteWeight::OneTypeVoteWeight::operator== ( const OneTypeVoteWeight other) const
inline

Definition at line 80 of file vote_weight.hpp.

void kagome::consensus::grandpa::VoteWeight::OneTypeVoteWeight::set ( size_t  index,
size_t  weight 
)
inline

Definition at line 32 of file vote_weight.hpp.

Weight kagome::consensus::grandpa::VoteWeight::OneTypeVoteWeight::total ( const std::vector< bool > &  equivocators,
const VoterSet voter_set 
) const
inline

Definition at line 54 of file vote_weight.hpp.

void kagome::consensus::grandpa::VoteWeight::OneTypeVoteWeight::unset ( size_t  index,
size_t  weight 
)
inline

Definition at line 43 of file vote_weight.hpp.

Member Data Documentation

std::vector<bool> kagome::consensus::grandpa::VoteWeight::OneTypeVoteWeight::flags

Definition at line 29 of file vote_weight.hpp.

Weight kagome::consensus::grandpa::VoteWeight::OneTypeVoteWeight::sum = 0

Definition at line 30 of file vote_weight.hpp.


The documentation for this struct was generated from the following file: