Kagome
Polkadot Runtime Engine in C++17
authority_update_observer.hpp
Go to the documentation of this file.
1 
6 #ifndef KAGOME_AUTHORITY_UPDATE_OBSERVER
7 #define KAGOME_AUTHORITY_UPDATE_OBSERVER
8 
9 #include <outcome/outcome.hpp>
10 
11 #include "primitives/digest.hpp"
12 
13 namespace kagome::authority {
15  public:
16  virtual ~AuthorityUpdateObserver() = default;
17 
23  virtual outcome::result<void> onConsensus(
24  const primitives::BlockInfo &block,
25  const primitives::Consensus &message) = 0;
26 
31  virtual void cancel(const primitives::BlockInfo &block) = 0;
32  };
33 } // namespace kagome::authority
34 
35 #endif // KAGOME_AUTHORITY_UPDATE_OBSERVER
virtual void cancel(const primitives::BlockInfo &block)=0
Cancel changes. Should be called when the block is rolled back.
virtual outcome::result< void > onConsensus(const primitives::BlockInfo &block, const primitives::Consensus &message)=0