TARAXA
Loading...
Searching...
No Matches
vote_packet_handler.hpp
Go to the documentation of this file.
1#pragma once
2
4
6
8 public:
9 IVotePacketHandler(const FullNodeConfig& conf, std::shared_ptr<PeersState> peers_state,
10 std::shared_ptr<TimePeriodPacketsStats> packets_stats, std::shared_ptr<PbftManager> pbft_mgr,
11 std::shared_ptr<PbftChain> pbft_chain, std::shared_ptr<VoteManager> vote_mgr,
12 std::shared_ptr<SlashingManager> slashing_manager, const std::string& log_channel_name);
13
21 void onNewPbftVote(const std::shared_ptr<PbftVote>& vote, const std::shared_ptr<PbftBlock>& block,
22 bool rebroadcast = false);
23
30 virtual void sendPbftVote(const std::shared_ptr<TaraxaPeer>& peer, const std::shared_ptr<PbftVote>& vote,
31 const std::shared_ptr<PbftBlock>& block);
32
40 void onNewPbftVotesBundle(const std::vector<std::shared_ptr<PbftVote>>& votes, bool rebroadcast = false,
41 const std::optional<dev::p2p::NodeID>& exclude_node = {});
42
49 virtual void sendPbftVotesBundle(const std::shared_ptr<TaraxaPeer>& peer,
50 std::vector<std::shared_ptr<PbftVote>>&& votes);
51};
52
53} // namespace taraxa::network::tarcap
ExtVotesPacketHandler is extended abstract PacketHandler with added functions that are used in packet...
Definition ext_votes_packet_handler.hpp:18
Definition vote_packet_handler.hpp:7
void onNewPbftVote(const std::shared_ptr< PbftVote > &vote, const std::shared_ptr< PbftBlock > &block, bool rebroadcast=false)
Sends pbft vote to connected peers.
Definition vote_packet_handler.cpp:17
virtual void sendPbftVote(const std::shared_ptr< TaraxaPeer > &peer, const std::shared_ptr< PbftVote > &vote, const std::shared_ptr< PbftBlock > &block)
Sends pbft vote to specified peer.
Definition vote_packet_handler.cpp:62
virtual void sendPbftVotesBundle(const std::shared_ptr< TaraxaPeer > &peer, std::vector< std::shared_ptr< PbftVote > > &&votes)
Sends pbft votes bundle to specified peer.
Definition vote_packet_handler.cpp:88
void onNewPbftVotesBundle(const std::vector< std::shared_ptr< PbftVote > > &votes, bool rebroadcast=false, const std::optional< dev::p2p::NodeID > &exclude_node={})
Sends pbft votes bundle to connected peers.
Definition vote_packet_handler.cpp:38
Definition vote_manager.hpp:24
Definition config.hpp:41