Kagome
Polkadot Runtime Engine in C++17
babe_config_repository.hpp
Go to the documentation of this file.
1 
6 #ifndef KAGOME_CONSENSUS_BABE_BABECONFIGREPOSITORY
7 #define KAGOME_CONSENSUS_BABE_BABECONFIGREPOSITORY
8 
10 
11 namespace kagome::consensus::babe {
12 
15  public:
16  virtual ~BabeConfigRepository() = default;
17 
20  virtual BabeDuration slotDuration() const = 0;
21 
24  virtual EpochLength epochLength() const = 0;
25 
28  virtual std::shared_ptr<const primitives::BabeConfiguration> config(
29  const primitives::BlockInfo &parent_block,
30  consensus::EpochNumber epoch_number) = 0;
31  };
32 
33 } // namespace kagome::consensus::babe
34 
35 #endif // KAGOME_CONSENSUS_BABE_BABECONFIGREPOSITORY
virtual std::shared_ptr< const primitives::BabeConfiguration > config(const primitives::BlockInfo &parent_block, consensus::EpochNumber epoch_number)=0
virtual EpochLength epochLength() const =0
EpochNumber EpochLength
Definition: common.hpp:30
virtual BabeDuration slotDuration() const =0
uint64_t EpochNumber
number of the epoch in the Babe production
Definition: common.hpp:27
BabeClock::Duration BabeDuration
Definition: common.hpp:21