4#include <unordered_map> 
   24  std::unordered_map<vote_hash_t, std::shared_ptr<PbftVote>> 
votes;
 
 
   27using UniqueVotersMap = std::unordered_map<addr_t, std::pair<std::shared_ptr<PbftVote>, std::shared_ptr<PbftVote>>>;
 
   30  std::unordered_map<blk_hash_t, VotesWithWeight> 
votes;
 
 
   55  uint64_t 
size() 
const;
 
   56  std::vector<std::shared_ptr<PbftVote>> 
votes() 
const;
 
   68  std::optional<std::shared_ptr<PbftVote>> 
insertUniqueVoter(
const std::shared_ptr<PbftVote>& vote);
 
   70  std::optional<VotesWithWeight> 
insertVotedValue(
const std::shared_ptr<PbftVote>& vote);
 
   77  std::pair<bool, PeriodVerifiedVotesMap::iterator> 
get(
PbftPeriod period);
 
   78  std::pair<bool, PeriodVerifiedVotesMap::const_iterator> 
get(
PbftPeriod period) 
const;
 
 
Definition verified_votes.hpp:51
 
uint64_t size() const
Definition verified_votes.cpp:8
 
std::vector< std::shared_ptr< PbftVote > > getTwoTPlusOneVotedBlockVotes(PbftPeriod period, PbftRound round, TwoTPlusOneVotedBlockType type) const
Definition verified_votes.cpp:110
 
std::pair< bool, StepVotesMap::iterator > get(PbftPeriod period, PbftRound round, PbftStep step)
 
std::vector< std::shared_ptr< PbftVote > > votes() const
Definition verified_votes.cpp:23
 
VerifiedVotes(addr_t node_addr)
Definition verified_votes.hpp:53
 
std::optional< VotesWithWeight > insertVotedValue(const std::shared_ptr< PbftVote > &vote)
Definition verified_votes.cpp:246
 
std::optional< const RoundVerifiedVotes > getRoundVotes(PbftPeriod period, PbftRound round) const
Definition verified_votes.cpp:53
 
std::pair< bool, PeriodVerifiedVotesMap::const_iterator > get(PbftPeriod period) const
 
PeriodVerifiedVotesMap verified_votes_
Definition verified_votes.hpp:85
 
std::optional< std::shared_ptr< PbftVote > > insertUniqueVoter(const std::shared_ptr< PbftVote > &vote)
Definition verified_votes.cpp:174
 
void setNetworkTPlusOneStep(std::shared_ptr< PbftVote > vote)
Definition verified_votes.cpp:138
 
void insertTwoTPlusOneVotedBlock(TwoTPlusOneVotedBlockType type, std::shared_ptr< PbftVote > vote)
Definition verified_votes.cpp:154
 
std::optional< VotedBlock > getTwoTPlusOneVotedBlock(PbftPeriod period, PbftRound round, TwoTPlusOneVotedBlockType type) const
Definition verified_votes.cpp:88
 
std::pair< bool, PeriodVerifiedVotesMap::iterator > get(PbftPeriod period)
 
void cleanupVotesByPeriod(PbftPeriod pbft_period)
Definition verified_votes.cpp:286
 
std::optional< const RoundVerifiedVotesMap > getPeriodVotes(PbftPeriod period) const
Definition verified_votes.cpp:43
 
std::shared_mutex verified_votes_access_
Definition verified_votes.hpp:84
 
std::pair< bool, StepVotesMap::const_iterator > get(PbftPeriod period, PbftRound round, PbftStep step) const
 
std::pair< bool, RoundVerifiedVotesMap::const_iterator > get(PbftPeriod period, PbftRound round) const
 
std::optional< const StepVotes > getStepVotes(PbftPeriod period, PbftRound round, PbftStep step) const
Definition verified_votes.cpp:68
 
std::pair< bool, RoundVerifiedVotesMap::iterator > get(PbftPeriod period, PbftRound round)
 
#define LOG_OBJECTS_DEFINE
Definition logger.hpp:60
 
#define LOG_OBJECTS_CREATE(channel)
Definition logger.hpp:68
 
std::unordered_map< blk_hash_t, VotesWithWeight > votes
Definition verified_votes.hpp:30
 
PbftStep network_t_plus_one_step
Definition verified_votes.hpp:45
 
uint32_t PbftStep
Definition types.hpp:26
 
std::map< PbftRound, RoundVerifiedVotes > RoundVerifiedVotesMap
Definition verified_votes.hpp:48
 
std::unordered_map< addr_t, std::pair< std::shared_ptr< PbftVote >, std::shared_ptr< PbftVote > > > UniqueVotersMap
Definition verified_votes.hpp:27
 
std::map< PbftStep, StepVotes > StepVotesMap
Definition verified_votes.hpp:33
 
uint32_t PbftRound
Definition types.hpp:25
 
EthBlockNumber PbftPeriod
Definition types.hpp:24
 
PbftStep step
Definition verified_votes.hpp:17
 
std::unordered_map< vote_hash_t, std::shared_ptr< PbftVote > > votes
Definition verified_votes.hpp:24
 
std::map< PbftPeriod, RoundVerifiedVotesMap > PeriodVerifiedVotesMap
Definition verified_votes.hpp:49
 
uint64_t weight
Definition verified_votes.hpp:23
 
std::unordered_map< TwoTPlusOneVotedBlockType, VotedBlock > TwoTVotedBlockMap
Definition verified_votes.hpp:20
 
blk_hash_t hash
Definition verified_votes.hpp:16
 
TwoTVotedBlockMap two_t_plus_one_voted_blocks_
Definition verified_votes.hpp:37
 
UniqueVotersMap unique_voters
Definition verified_votes.hpp:31
 
TwoTPlusOneVotedBlockType
Definition verified_votes.hpp:13
 
StepVotesMap step_votes
Definition verified_votes.hpp:39
 
Definition verified_votes.hpp:35
 
Definition verified_votes.hpp:29
 
Definition verified_votes.hpp:15
 
Definition verified_votes.hpp:22