TARAXA
get_next_votes_bundle_packet_handler.hpp
Go to the documentation of this file.
1 #pragma once
2 
4 
5 namespace taraxa {
6 class PbftManager;
7 class VoteManager;
8 } // namespace taraxa
9 
10 namespace taraxa::network::tarcap {
11 
13  public:
14  GetNextVotesBundlePacketHandler(const FullNodeConfig& conf, std::shared_ptr<PeersState> peers_state,
15  std::shared_ptr<TimePeriodPacketsStats> packets_stats,
16  std::shared_ptr<PbftManager> pbft_mgr, std::shared_ptr<PbftChain> pbft_chain,
17  std::shared_ptr<VoteManager> vote_mgr,
18  std::shared_ptr<SlashingManager> slashing_manager, const addr_t& node_addr,
19  const std::string& logs_prefix = "GET_NEXT_VOTES_BUNDLE_PH");
20 
21  // Packet type that is processed by this handler
23 
24  private:
25  virtual void validatePacketRlpFormat(const threadpool::PacketData& packet_data) const override;
26  virtual void process(const threadpool::PacketData& packet_data, const std::shared_ptr<TaraxaPeer>& peer) override;
27 };
28 
29 } // 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:20
Definition: get_next_votes_bundle_packet_handler.hpp:12
virtual void process(const threadpool::PacketData &packet_data, const std::shared_ptr< TaraxaPeer > &peer) override
Main packet processing function.
Definition: get_next_votes_bundle_packet_handler.cpp:23
virtual void validatePacketRlpFormat(const threadpool::PacketData &packet_data) const override
Validates packet rlp format - items count.
Definition: get_next_votes_bundle_packet_handler.cpp:17
GetNextVotesBundlePacketHandler(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 &logs_prefix="GET_NEXT_VOTES_BUNDLE_PH")
Definition: get_next_votes_bundle_packet_handler.cpp:8
static constexpr SubprotocolPacketType kPacketType_
Definition: get_next_votes_bundle_packet_handler.hpp:22
Definition: packet_data.hpp:12
Definition: vote_manager.hpp:23
SubprotocolPacketType
SubprotocolPacketType is used in networking layer to differentiate packet types.
Definition: packet_types.hpp:12
@ GetNextVotesSyncPacket
Definition: packet_types.hpp:16
Definition: config.hpp:8
Definition: config.hpp:24