Kagome
Polkadot Runtime Engine in C++17
block_builder.hpp
Go to the documentation of this file.
1 
6 #ifndef KAGOME_CORE_AUTHORSHIP_BLOCK_BUILDER_HPP
7 #define KAGOME_CORE_AUTHORSHIP_BLOCK_BUILDER_HPP
8 
9 #include "primitives/block.hpp"
10 #include "primitives/extrinsic.hpp"
12 
13 namespace kagome::authorship {
14 
19  class BlockBuilder {
20  public:
21  virtual ~BlockBuilder() = default;
22 
23  virtual outcome::result<std::vector<primitives::Extrinsic>>
24  getInherentExtrinsics(const primitives::InherentData &data) const = 0;
25 
30  virtual outcome::result<primitives::ExtrinsicIndex> pushExtrinsic(
31  const primitives::Extrinsic &extrinsic) = 0;
32 
36  virtual outcome::result<primitives::Block> bake() const = 0;
37 
42  virtual size_t estimateBlockSize() const = 0;
43  };
44 
45 } // namespace kagome::authorship
46 
47 #endif // KAGOME_CORE_AUTHORSHIP_BLOCK_BUILDER_HPP
virtual outcome::result< std::vector< primitives::Extrinsic > > getInherentExtrinsics(const primitives::InherentData &data) const =0
virtual outcome::result< primitives::Block > bake() const =0
virtual outcome::result< primitives::ExtrinsicIndex > pushExtrinsic(const primitives::Extrinsic &extrinsic)=0
virtual size_t estimateBlockSize() const =0
Extrinsic class represents extrinsic.
Definition: extrinsic.hpp:24