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 addr_t& node_addr,
13 const std::string& logs_prefix);
14
22 void onNewPbftVote(const std::shared_ptr<PbftVote>& vote, const std::shared_ptr<PbftBlock>& block,
23 bool rebroadcast = false);
24
31 virtual void sendPbftVote(const std::shared_ptr<TaraxaPeer>& peer, const std::shared_ptr<PbftVote>& vote,
32 const std::shared_ptr<PbftBlock>& block);
33
41 void onNewPbftVotesBundle(const std::vector<std::shared_ptr<PbftVote>>& votes, bool rebroadcast = false,
42 const std::optional<dev::p2p::NodeID>& exclude_node = {});
43
50 virtual void sendPbftVotesBundle(const std::shared_ptr<TaraxaPeer>& peer,
51 std::vector<std::shared_ptr<PbftVote>>&& votes);
52};
53
54} // namespace taraxa::network::tarcap
Definition FixedHash.h:35
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:23
Definition config.hpp:40