Kagome
Polkadot Runtime Engine in C++17
digest_tracker_impl.hpp
Go to the documentation of this file.
1 
6 #ifndef KAGOME_BLOCKCHAIN_DIGESTTRACKERIMPL
7 #define KAGOME_BLOCKCHAIN_DIGESTTRACKERIMPL
8 
10 
11 #include "log/logger.hpp"
12 
13 namespace kagome::authority {
15 }
16 namespace kagome::consensus {
17  class BabeDigestObserver;
18 }
19 
20 namespace kagome::blockchain {
21 
22  class DigestTrackerImpl final : public DigestTracker {
23  public:
25  std::shared_ptr<consensus::BabeDigestObserver> babe_update_observer,
26  std::shared_ptr<authority::AuthorityUpdateObserver>
27  authority_update_observer);
28 
29  outcome::result<void> onDigest(const primitives::BlockInfo &block,
30  const primitives::Digest &digest) override;
31 
32  void cancel(const primitives::BlockInfo &block) override;
33 
34  private:
35  outcome::result<void> onPreRuntime(const primitives::BlockInfo &block,
36  const primitives::PreRuntime &message);
37 
38  outcome::result<void> onConsensus(
39  const primitives::BlockInfo &block,
40  const primitives::Consensus &consensus_message);
41 
42  std::shared_ptr<consensus::BabeDigestObserver> babe_digest_observer_;
43  std::shared_ptr<authority::AuthorityUpdateObserver>
45 
47  };
48 
49 } // namespace kagome::blockchain
50 
51 #endif // KAGOME_BLOCKCHAIN_DIGESTTRACKERIMPL
std::shared_ptr< authority::AuthorityUpdateObserver > authority_update_observer_
std::shared_ptr< consensus::BabeDigestObserver > babe_digest_observer_
std::shared_ptr< soralog::Logger > Logger
Definition: logger.hpp:23