11 class SlashingManager;
23 std::shared_ptr<TimePeriodPacketsStats> packets_stats, std::shared_ptr<PbftManager> pbft_mgr,
24 std::shared_ptr<PbftChain> pbft_chain, std::shared_ptr<VoteManager> vote_mgr,
25 std::shared_ptr<SlashingManager> slashing_manager,
const addr_t& node_addr,
26 const std::string& log_channel_name);
43 bool processVote(
const std::shared_ptr<PbftVote>& vote,
const std::shared_ptr<PbftBlock>& pbft_block,
44 const std::shared_ptr<TaraxaPeer>& peer,
bool validate_max_round_step);
54 std::vector<std::shared_ptr<PbftVote>>&& votes);
66 const std::shared_ptr<TaraxaPeer>& peer,
67 bool validate_max_round_step);
76 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:20
std::chrono::system_clock::time_point last_pbft_block_sync_request_time_
Definition: ext_votes_packet_handler.hpp:83
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:70
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:151
ExtVotesPacketHandler(const ExtVotesPacketHandler &)=delete
constexpr static size_t kMaxVotesInBundleRlp
Definition: ext_votes_packet_handler.hpp:79
ExtVotesPacketHandler & operator=(const ExtVotesPacketHandler &)=delete
virtual ~ExtVotesPacketHandler()=default
ExtVotesPacketHandler(ExtVotesPacketHandler &&)=delete
std::chrono::system_clock::time_point last_votes_sync_request_time_
Definition: ext_votes_packet_handler.hpp:82
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:161
ExtVotesPacketHandler(const FullNodeConfig &conf, std::shared_ptr< PeersState > peers_state, std::shared_ptr< TimePeriodPacketsStats > packets_stats, std::shared_ptr< PbftManager > pbft_mgr, std::shared_ptr< PbftChain > pbft_chain, std::shared_ptr< VoteManager > vote_mgr, std::shared_ptr< SlashingManager > slashing_manager, const addr_t &node_addr, const std::string &log_channel_name)
Definition: ext_votes_packet_handler.cpp:11
std::shared_ptr< PbftChain > pbft_chain_
Definition: ext_votes_packet_handler.hpp:86
std::shared_ptr< PbftManager > pbft_mgr_
Definition: ext_votes_packet_handler.hpp:85
ExtVotesPacketHandler & operator=(ExtVotesPacketHandler &&)=delete
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:26
constexpr static std::chrono::seconds kSyncRequestInterval
Definition: ext_votes_packet_handler.hpp:80
std::shared_ptr< VoteManager > vote_mgr_
Definition: ext_votes_packet_handler.hpp:87
virtual void sendPbftVotesBundle(const std::shared_ptr< TaraxaPeer > &peer, std::vector< std::shared_ptr< PbftVote >> &&votes)
Definition: ext_votes_packet_handler.cpp:179
std::shared_ptr< SlashingManager > slashing_manager_
Definition: ext_votes_packet_handler.hpp:88
Packet handler base class that consists of shared state and some commonly used functions.
Definition: packet_handler.hpp:25
std::chrono::system_clock::time_point time_point
Definition: watches.hpp:12
Definition: vote_manager.hpp:23
Definition: config.hpp:24