Kagome
Polkadot Runtime Engine in C++17
neighbor_observer.hpp
Go to the documentation of this file.
1 
6 #ifndef KAGOME_CORE_CONSENSUS_GRANDPA_NEIGHBOROBSERVER
7 #define KAGOME_CORE_CONSENSUS_GRANDPA_NEIGHBOROBSERVER
8 
9 #include <libp2p/peer/peer_id.hpp>
10 
12 
14 
20  virtual ~NeighborObserver() = default;
21 
26  virtual void onNeighborMessage(
27  const libp2p::peer::PeerId &peer_id,
28  const network::GrandpaNeighborMessage &msg) = 0;
29  };
30 
31 } // namespace kagome::consensus::grandpa
32 
33 #endif // KAGOME_CORE_CONSENSUS_GRANDPA_NEIGHBOROBSERVER
observes incoming neighbor messages. Abstraction of a network.
libp2p::peer::PeerId PeerId
virtual void onNeighborMessage(const libp2p::peer::PeerId &peer_id, const network::GrandpaNeighborMessage &msg)=0