Kagome
Polkadot Runtime Engine in C++17
block_validator.hpp
Go to the documentation of this file.
1 
6 #ifndef KAGOME_BLOCK_VALIDATOR_HPP
7 #define KAGOME_BLOCK_VALIDATOR_HPP
8 
9 #include "outcome/outcome.hpp"
11 #include "primitives/block.hpp"
12 
13 namespace kagome::consensus {
18  public:
19  virtual ~BlockValidator() = default;
20 
29  virtual outcome::result<void> validateHeader(
30  const primitives::BlockHeader &block_header,
31  const EpochNumber epoch_number,
32  const primitives::AuthorityId &authority_id,
33  const Threshold &threshold,
34  const primitives::BabeConfiguration &config) const = 0;
35  };
36 } // namespace kagome::consensus
37 
38 #endif // KAGOME_BLOCK_VALIDATOR_HPP
Configuration data used by the BABE consensus engine.
virtual outcome::result< void > validateHeader(const primitives::BlockHeader &block_header, const EpochNumber epoch_number, const primitives::AuthorityId &authority_id, const Threshold &threshold, const primitives::BabeConfiguration &config) const =0
uint64_t EpochNumber
number of the epoch in the Babe production
Definition: common.hpp:27
crypto::VRFThreshold Threshold
threshold, which must not be exceeded for the party to be a slot leader
Definition: common.hpp:33