Kagome
Polkadot Runtime Engine in C++17
round_observer.hpp
Go to the documentation of this file.
1 
6 #ifndef KAGOME_CORE_CONSENSUS_GRANDPA_ROUND_OBSERVER_HPP
7 #define KAGOME_CORE_CONSENSUS_GRANDPA_ROUND_OBSERVER_HPP
8 
9 #include <libp2p/peer/peer_id.hpp>
10 #include <optional>
11 
15 
17 
22  struct RoundObserver {
23  virtual ~RoundObserver() = default;
24 
30  virtual void onVoteMessage(const libp2p::peer::PeerId &peer_id,
31  const VoteMessage &msg) = 0;
32 
38  virtual void onCommitMessage(const libp2p::peer::PeerId &peer_id,
39  const network::FullCommitMessage &msg) = 0;
40  };
41 
42 } // namespace kagome::consensus::grandpa
43 
44 #endif // KAGOME_CORE_CONSENSUS_GRANDPA_ROUND_OBSERVER_HPP
observes incoming messages. Abstraction of a network.
virtual void onCommitMessage(const libp2p::peer::PeerId &peer_id, const network::FullCommitMessage &msg)=0
libp2p::peer::PeerId PeerId
virtual void onVoteMessage(const libp2p::peer::PeerId &peer_id, const VoteMessage &msg)=0