Kagome
Polkadot Runtime Engine in C++17
kagome::runtime::BlockBuilderImpl Class Referencefinal

#include <block_builder.hpp>

Inheritance diagram for kagome::runtime::BlockBuilderImpl:
Collaboration diagram for kagome::runtime::BlockBuilderImpl:

Public Member Functions

 BlockBuilderImpl (std::shared_ptr< Executor > executor)
 
outcome::result< PersistentResult< primitives::ApplyExtrinsicResult > > apply_extrinsic (const primitives::BlockInfo &block, storage::trie::RootHash const &storage_hash, const primitives::Extrinsic &extrinsic) override
 
outcome::result< primitives::BlockHeaderfinalize_block (const primitives::BlockInfo &block, storage::trie::RootHash const &storage_hash) override
 
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::CheckInherentsResultcheck_inherents (const primitives::Block &block, const primitives::InherentData &data) override
 
outcome::result< common::Hash256random_seed (const primitives::BlockHash &block) override
 
- Public Member Functions inherited from kagome::runtime::BlockBuilder
virtual ~BlockBuilder ()=default
 

Private Attributes

std::shared_ptr< Executorexecutor_
 

Detailed Description

Definition at line 15 of file block_builder.hpp.

Constructor & Destructor Documentation

kagome::runtime::BlockBuilderImpl::BlockBuilderImpl ( std::shared_ptr< Executor executor)
explicit

Definition at line 12 of file block_builder.cpp.

Member Function Documentation

outcome::result< PersistentResult< primitives::ApplyExtrinsicResult > > kagome::runtime::BlockBuilderImpl::apply_extrinsic ( const primitives::BlockInfo block,
storage::trie::RootHash const &  storage_hash,
const primitives::Extrinsic extrinsic 
)
overridevirtual

Apply the given extrinsic.

Implements kagome::runtime::BlockBuilder.

Definition at line 18 of file block_builder.cpp.

outcome::result< primitives::CheckInherentsResult > kagome::runtime::BlockBuilderImpl::check_inherents ( const primitives::Block block,
const primitives::InherentData data 
)
overridevirtual

Check that the inherents are valid. The inherent data will vary from chain to chain.

Implements kagome::runtime::BlockBuilder.

Definition at line 44 of file block_builder.cpp.

outcome::result< primitives::BlockHeader > kagome::runtime::BlockBuilderImpl::finalize_block ( const primitives::BlockInfo block,
storage::trie::RootHash const &  storage_hash 
)
overridevirtual

Finish the current block.

Implements kagome::runtime::BlockBuilder.

Definition at line 25 of file block_builder.cpp.

outcome::result< std::vector< primitives::Extrinsic > > kagome::runtime::BlockBuilderImpl::inherent_extrinsics ( const primitives::BlockInfo block,
storage::trie::RootHash const &  storage_hash,
const primitives::InherentData data 
)
overridevirtual

Generate inherent extrinsics. The inherent data will vary from chain to chain.

Implements kagome::runtime::BlockBuilder.

Definition at line 35 of file block_builder.cpp.

outcome::result< common::Hash256 > kagome::runtime::BlockBuilderImpl::random_seed ( const primitives::BlockHash block)
overridevirtual

Generate a random seed.

Implements kagome::runtime::BlockBuilder.

Definition at line 50 of file block_builder.cpp.

Member Data Documentation

std::shared_ptr<Executor> kagome::runtime::BlockBuilderImpl::executor_
private

Definition at line 41 of file block_builder.hpp.


The documentation for this class was generated from the following files: