21 std::shared_ptr<TimePeriodPacketsStats> packets_stats, std::shared_ptr<PbftManager> pbft_mgr,
22 std::shared_ptr<PbftChain> pbft_chain, std::shared_ptr<VoteManager> vote_mgr,
23 std::shared_ptr<SlashingManager> slashing_manager,
const addr_t& node_addr,
24 const std::string& log_channel_name);
41 bool processVote(
const std::shared_ptr<PbftVote>& vote,
const std::shared_ptr<PbftBlock>& pbft_block,
42 const std::shared_ptr<TaraxaPeer>& peer,
bool validate_max_round_step);
63 const std::shared_ptr<TaraxaPeer>& peer,
64 bool validate_max_round_step);
73 bool validateVoteAndBlock(
const std::shared_ptr<PbftVote>& vote,
const std::shared_ptr<PbftBlock>& pbft_block)
const;
Definition FixedHash.h:35
ExtVotesPacketHandler is extended abstract PacketHandler with added functions that are used in packet...
Definition ext_votes_packet_handler.hpp:18
std::chrono::system_clock::time_point last_pbft_block_sync_request_time_
Definition ext_votes_packet_handler.hpp:80
std::pair< bool, std::string > validateVotePeriodRoundStep(const std::shared_ptr< PbftVote > &vote, const std::shared_ptr< TaraxaPeer > &peer, bool validate_max_round_step)
Validates vote period, round and step against max values from config.
Definition ext_votes_packet_handler.cpp:72
bool validateVoteAndBlock(const std::shared_ptr< PbftVote > &vote, const std::shared_ptr< PbftBlock > &pbft_block) const
Validates provided vote if voted value == provided block.
Definition ext_votes_packet_handler.cpp:154
ExtVotesPacketHandler & operator=(const ExtVotesPacketHandler &)=delete
ExtVotesPacketHandler(const ExtVotesPacketHandler &)=delete
static constexpr std::chrono::seconds kSyncRequestInterval
Definition ext_votes_packet_handler.hpp:77
static constexpr size_t kMaxVotesInBundleRlp
Definition ext_votes_packet_handler.hpp:76
virtual ~ExtVotesPacketHandler()=default
void requestPbftNextVotesAtPeriodRound(const dev::p2p::NodeID &peerID, PbftPeriod pbft_period, PbftRound pbft_round)
Definition ext_votes_packet_handler.cpp:189
ExtVotesPacketHandler(ExtVotesPacketHandler &&)=delete
std::chrono::system_clock::time_point last_votes_sync_request_time_
Definition ext_votes_packet_handler.hpp:79
bool isPbftRelevantVote(const std::shared_ptr< PbftVote > &vote) const
Checks is vote is relevant for current pbft state in terms of period, round and type.
Definition ext_votes_packet_handler.cpp:171
std::shared_ptr< PbftChain > pbft_chain_
Definition ext_votes_packet_handler.hpp:83
ExtVotesPacketHandler & operator=(ExtVotesPacketHandler &&)=delete
std::shared_ptr< PbftManager > pbft_mgr_
Definition ext_votes_packet_handler.hpp:82
bool processVote(const std::shared_ptr< PbftVote > &vote, const std::shared_ptr< PbftBlock > &pbft_block, const std::shared_ptr< TaraxaPeer > &peer, bool validate_max_round_step)
Process vote.
Definition ext_votes_packet_handler.cpp:27
std::shared_ptr< VoteManager > vote_mgr_
Definition ext_votes_packet_handler.hpp:84
std::shared_ptr< SlashingManager > slashing_manager_
Definition ext_votes_packet_handler.hpp:85
Packet handler base class that consists of shared state and some commonly used functions.
Definition packet_handler.hpp:33
Definition vote_manager.hpp:23
uint32_t PbftRound
Definition types.hpp:25
EthBlockNumber PbftPeriod
Definition types.hpp:24