Kagome
Polkadot Runtime Engine in C++17
kagome::authorship::BlockBuilderImpl Class Reference

#include <block_builder_impl.hpp>

Inheritance diagram for kagome::authorship::BlockBuilderImpl:
Collaboration diagram for kagome::authorship::BlockBuilderImpl:

Public Member Functions

 ~BlockBuilderImpl () override=default
 
 BlockBuilderImpl (primitives::BlockHeader block_header, const storage::trie::RootHash &storage_state, std::shared_ptr< runtime::BlockBuilder > block_builder_api)
 
outcome::result< std::vector< primitives::Extrinsic > > getInherentExtrinsics (const primitives::InherentData &data) const override
 
outcome::result< primitives::ExtrinsicIndexpushExtrinsic (const primitives::Extrinsic &extrinsic) override
 
outcome::result< primitives::Blockbake () const override
 
size_t estimateBlockSize () const override
 
- Public Member Functions inherited from kagome::authorship::BlockBuilder
virtual ~BlockBuilder ()=default
 

Private Member Functions

size_t estimatedBlockHeaderSize () const
 

Private Attributes

primitives::BlockHeader block_header_
 
std::shared_ptr< runtime::BlockBuilderblock_builder_api_
 
storage::trie::RootHash storage_state_
 
log::Logger logger_
 
std::vector< primitives::Extrinsicextrinsics_ {}
 

Detailed Description

Definition at line 19 of file block_builder_impl.hpp.

Constructor & Destructor Documentation

kagome::authorship::BlockBuilderImpl::~BlockBuilderImpl ( )
overridedefault
kagome::authorship::BlockBuilderImpl::BlockBuilderImpl ( primitives::BlockHeader  block_header,
const storage::trie::RootHash storage_state,
std::shared_ptr< runtime::BlockBuilder block_builder_api 
)

Definition at line 18 of file block_builder_impl.cpp.

Member Function Documentation

outcome::result< primitives::Block > kagome::authorship::BlockBuilderImpl::bake ( ) const
overridevirtual

Create a block from extrinsics and header

Implements kagome::authorship::BlockBuilder.

Definition at line 104 of file block_builder_impl.cpp.

size_t kagome::authorship::BlockBuilderImpl::estimateBlockSize ( ) const
overridevirtual

Estimate size of encoded block representation

Returns
size in bytes

Implements kagome::authorship::BlockBuilder.

Definition at line 112 of file block_builder_impl.cpp.

size_t kagome::authorship::BlockBuilderImpl::estimatedBlockHeaderSize ( ) const
private

Definition at line 120 of file block_builder_impl.cpp.

outcome::result< std::vector< primitives::Extrinsic > > kagome::authorship::BlockBuilderImpl::getInherentExtrinsics ( const primitives::InherentData data) const
overridevirtual

Implements kagome::authorship::BlockBuilder.

Definition at line 30 of file block_builder_impl.cpp.

outcome::result< primitives::ExtrinsicIndex > kagome::authorship::BlockBuilderImpl::pushExtrinsic ( const primitives::Extrinsic extrinsic)
overridevirtual

Push extrinsic to wait its inclusion to the block Returns result containing success if xt was pushed, error otherwise

Implements kagome::authorship::BlockBuilder.

Definition at line 38 of file block_builder_impl.cpp.

Member Data Documentation

std::shared_ptr<runtime::BlockBuilder> kagome::authorship::BlockBuilderImpl::block_builder_api_
private

Definition at line 41 of file block_builder_impl.hpp.

primitives::BlockHeader kagome::authorship::BlockBuilderImpl::block_header_
private

Definition at line 40 of file block_builder_impl.hpp.

std::vector<primitives::Extrinsic> kagome::authorship::BlockBuilderImpl::extrinsics_ {}
private

Definition at line 45 of file block_builder_impl.hpp.

log::Logger kagome::authorship::BlockBuilderImpl::logger_
private

Definition at line 43 of file block_builder_impl.hpp.

storage::trie::RootHash kagome::authorship::BlockBuilderImpl::storage_state_
private

Definition at line 42 of file block_builder_impl.hpp.


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