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

#include <module_repository_impl.hpp>

Inheritance diagram for kagome::runtime::ModuleRepositoryImpl:
Collaboration diagram for kagome::runtime::ModuleRepositoryImpl:

Public Member Functions

 ModuleRepositoryImpl (std::shared_ptr< RuntimeInstancesPool > runtime_instances_pool, std::shared_ptr< RuntimeUpgradeTracker > runtime_upgrade_tracker, std::shared_ptr< const ModuleFactory > module_factory, std::shared_ptr< SingleModuleCache > last_compiled_module)
 
outcome::result< std::shared_ptr< ModuleInstance > > getInstanceAt (std::shared_ptr< const RuntimeCodeProvider > code_provider, const primitives::BlockInfo &block, const primitives::BlockHeader &header) override
 Returns a module instance for runtime at the. More...
 
- Public Member Functions inherited from kagome::runtime::ModuleRepository
virtual ~ModuleRepository ()=default
 

Private Attributes

std::shared_ptr< RuntimeInstancesPoolruntime_instances_pool_
 
std::shared_ptr< RuntimeUpgradeTrackerruntime_upgrade_tracker_
 
std::shared_ptr< const ModuleFactorymodule_factory_
 
std::shared_ptr< SingleModuleCachelast_compiled_module_
 
log::Logger logger_
 

Detailed Description

Definition at line 23 of file module_repository_impl.hpp.

Constructor & Destructor Documentation

kagome::runtime::ModuleRepositoryImpl::ModuleRepositoryImpl ( std::shared_ptr< RuntimeInstancesPool runtime_instances_pool,
std::shared_ptr< RuntimeUpgradeTracker runtime_upgrade_tracker,
std::shared_ptr< const ModuleFactory module_factory,
std::shared_ptr< SingleModuleCache last_compiled_module 
)

Definition at line 21 of file module_repository_impl.cpp.

Member Function Documentation

outcome::result< std::shared_ptr< ModuleInstance > > kagome::runtime::ModuleRepositoryImpl::getInstanceAt ( std::shared_ptr< const RuntimeCodeProvider code_provider,
const primitives::BlockInfo block,
const primitives::BlockHeader header 
)
overridevirtual

Returns a module instance for runtime at the.

  • block state, loading its code using the provided
  • code_provider
    Parameters
    code_providerthe code provider used to extract the runtime code from the given block
    blockinfo of the block at which the runtime code should be extracted
    headerof the block at which the runtime code should be extracted

Implements kagome::runtime::ModuleRepository.

Definition at line 38 of file module_repository_impl.cpp.

Member Data Documentation

std::shared_ptr<SingleModuleCache> kagome::runtime::ModuleRepositoryImpl::last_compiled_module_
private

Definition at line 40 of file module_repository_impl.hpp.

log::Logger kagome::runtime::ModuleRepositoryImpl::logger_
private

Definition at line 41 of file module_repository_impl.hpp.

std::shared_ptr<const ModuleFactory> kagome::runtime::ModuleRepositoryImpl::module_factory_
private

Definition at line 39 of file module_repository_impl.hpp.

std::shared_ptr<RuntimeInstancesPool> kagome::runtime::ModuleRepositoryImpl::runtime_instances_pool_
private

Definition at line 37 of file module_repository_impl.hpp.

std::shared_ptr<RuntimeUpgradeTracker> kagome::runtime::ModuleRepositoryImpl::runtime_upgrade_tracker_
private

Definition at line 38 of file module_repository_impl.hpp.


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