Kagome
Polkadot Runtime Engine in C++17
babe_digest_observer.hpp
Go to the documentation of this file.
1 
6 #ifndef KAGOME_CONSENSUS_BABEDIGESTOBSERVER
7 #define KAGOME_CONSENSUS_BABEDIGESTOBSERVER
8 
9 #include "outcome/outcome.hpp"
10 #include "primitives/common.hpp"
11 #include "primitives/digest.hpp"
12 
13 namespace kagome::consensus {
14 
16  public:
17  virtual ~BabeDigestObserver() = default;
18 
22  virtual outcome::result<void> onDigest(
23  const primitives::BlockInfo &block,
24  const consensus::BabeBlockHeader &digest) = 0;
25 
29  virtual outcome::result<void> onDigest(
30  const primitives::BlockInfo &block,
31  const primitives::BabeDigest &digest) = 0;
32 
33  virtual void cancel(const primitives::BlockInfo &block) = 0;
34  };
35 
36 } // namespace kagome::consensus
37 
38 #endif // KAGOME_CONSENSUS_BABEDIGESTOBSERVER
boost::variant< Unused< 0 >, NextEpochData, OnDisabled, NextConfigData > BabeDigest
https://github.com/paritytech/substrate/blob/polkadot-v0.9.8/primitives/consensus/babe/src/lib.rs#L130
Definition: digest.hpp:63
virtual void cancel(const primitives::BlockInfo &block)=0
virtual outcome::result< void > onDigest(const primitives::BlockInfo &block, const consensus::BabeBlockHeader &digest)=0