Kagome
Polkadot Runtime Engine in C++17
catch_up_observer.hpp
Go to the documentation of this file.
1 
6 #ifndef KAGOME_CORE_CONSENSUS_GRANDPA_CATCHUPOBSERVER
7 #define KAGOME_CORE_CONSENSUS_GRANDPA_CATCHUPOBSERVER
8 
9 #include <libp2p/peer/peer_id.hpp>
10 
12 
14 
19  struct CatchUpObserver {
20  virtual ~CatchUpObserver() = default;
21 
26  virtual void onCatchUpRequest(const libp2p::peer::PeerId &peer_id,
27  const network::CatchUpRequest &msg) = 0;
28 
33  virtual void onCatchUpResponse(const libp2p::peer::PeerId &peer_id,
34  const network::CatchUpResponse &msg) = 0;
35  };
36 
37 } // namespace kagome::consensus::grandpa
38 
39 #endif // KAGOME_CORE_CONSENSUS_GRANDPA_CATCHUPOBSERVER
virtual void onCatchUpRequest(const libp2p::peer::PeerId &peer_id, const network::CatchUpRequest &msg)=0
libp2p::peer::PeerId PeerId
observes incoming catch-up messages. Abstraction of a network.
virtual void onCatchUpResponse(const libp2p::peer::PeerId &peer_id, const network::CatchUpResponse &msg)=0