Kagome
Polkadot Runtime Engine in C++17
block_builder.hpp
Go to the documentation of this file.
1 
6 #ifndef KAGOME_RUNTIME_IMPL_BLOCK_BUILDER_HPP
7 #define KAGOME_RUNTIME_IMPL_BLOCK_BUILDER_HPP
8 
10 
11 namespace kagome::runtime {
12 
13  class Executor;
14 
15  class BlockBuilderImpl final : public BlockBuilder {
16  public:
17  explicit BlockBuilderImpl(std::shared_ptr<Executor> executor);
18 
19  outcome::result<PersistentResult<primitives::ApplyExtrinsicResult>>
21  storage::trie::RootHash const &storage_hash,
22  const primitives::Extrinsic &extrinsic) override;
23 
24  outcome::result<primitives::BlockHeader> finalize_block(
25  const primitives::BlockInfo &block,
26  storage::trie::RootHash const &storage_hash) override;
27 
28  outcome::result<std::vector<primitives::Extrinsic>> inherent_extrinsics(
29  const primitives::BlockInfo &block,
30  storage::trie::RootHash const &storage_hash,
31  const primitives::InherentData &data) override;
32 
33  outcome::result<primitives::CheckInherentsResult> check_inherents(
34  const primitives::Block &block,
35  const primitives::InherentData &data) override;
36 
37  outcome::result<common::Hash256> random_seed(
38  const primitives::BlockHash &block) override;
39 
40  private:
41  std::shared_ptr<Executor> executor_;
42  };
43 } // namespace kagome::runtime
44 
45 #endif // KAGOME_RUNTIME_BLOCK_BUILDER_HPP
outcome::result< std::vector< primitives::Extrinsic > > inherent_extrinsics(const primitives::BlockInfo &block, storage::trie::RootHash const &storage_hash, const primitives::InherentData &data) override
outcome::result< primitives::CheckInherentsResult > check_inherents(const primitives::Block &block, const primitives::InherentData &data) override
BlockBuilderImpl(std::shared_ptr< Executor > executor)
Block class represents polkadot block primitive.
Definition: block.hpp:19
std::shared_ptr< Executor > executor_
outcome::result< common::Hash256 > random_seed(const primitives::BlockHash &block) override
outcome::result< PersistentResult< primitives::ApplyExtrinsicResult > > apply_extrinsic(const primitives::BlockInfo &block, storage::trie::RootHash const &storage_hash, const primitives::Extrinsic &extrinsic) override
Extrinsic class represents extrinsic.
Definition: extrinsic.hpp:24
outcome::result< primitives::BlockHeader > finalize_block(const primitives::BlockInfo &block, storage::trie::RootHash const &storage_hash) override