Kagome
Polkadot Runtime Engine in C++17
|
#include <runtime_environment_factory.hpp>
Classes | |
struct | RuntimeEnvironmentTemplate |
Public Types | |
enum | Error { Error::PARENT_FACTORY_EXPIRED = 1, Error::ABSENT_BLOCK, Error::ABSENT_HEAP_BASE, Error::FAILED_TO_SET_STORAGE_STATE } |
Public Member Functions | |
RuntimeEnvironmentFactory (std::shared_ptr< const runtime::RuntimeCodeProvider > code_provider, std::shared_ptr< ModuleRepository > module_repo, std::shared_ptr< const blockchain::BlockHeaderRepository > header_repo) | |
virtual | ~RuntimeEnvironmentFactory ()=default |
virtual std::unique_ptr< RuntimeEnvironmentTemplate > | start (const primitives::BlockInfo &blockchain_state, const storage::trie::RootHash &storage_state) const |
virtual outcome::result< std::unique_ptr< RuntimeEnvironmentTemplate > > | start (const primitives::BlockHash &blockchain_state) const |
returns a handle to make a RuntimeEnvironment at the state of the provided block More... | |
virtual outcome::result< std::unique_ptr< RuntimeEnvironmentTemplate > > | start () const |
returns a handle to make a RuntimeEnvironment at genesis block state More... | |
Private Attributes | |
std::shared_ptr< const runtime::RuntimeCodeProvider > | code_provider_ |
std::shared_ptr< ModuleRepository > | module_repo_ |
std::shared_ptr< const blockchain::BlockHeaderRepository > | header_repo_ |
log::Logger | logger_ |
Definition at line 38 of file runtime_environment_factory.hpp.
Enumerator | |
---|---|
PARENT_FACTORY_EXPIRED | |
ABSENT_BLOCK | |
ABSENT_HEAP_BASE | |
FAILED_TO_SET_STORAGE_STATE |
Definition at line 41 of file runtime_environment_factory.hpp.
kagome::runtime::RuntimeEnvironmentFactory::RuntimeEnvironmentFactory | ( | std::shared_ptr< const runtime::RuntimeCodeProvider > | code_provider, |
std::shared_ptr< ModuleRepository > | module_repo, | ||
std::shared_ptr< const blockchain::BlockHeaderRepository > | header_repo | ||
) |
Definition at line 161 of file runtime_environment_factory.cpp.
|
virtualdefault |
|
virtual |
blockchain_state | - the block to take the runtime code from |
storage_state | need to store separately from blockchain state because, for example, when we're in process of producing a block, there is no particular storage state associated with the block |
Definition at line 175 of file runtime_environment_factory.cpp.
|
virtual |
returns a handle to make a RuntimeEnvironment at the state of the provided block
blockchain_state | - the block to take the runtime code from |
Definition at line 184 of file runtime_environment_factory.cpp.
|
virtual |
returns a handle to make a RuntimeEnvironment at genesis block state
Definition at line 193 of file runtime_environment_factory.cpp.
|
private |
Definition at line 92 of file runtime_environment_factory.hpp.
|
private |
Definition at line 94 of file runtime_environment_factory.hpp.
|
private |
Definition at line 95 of file runtime_environment_factory.hpp.
|
private |
Definition at line 93 of file runtime_environment_factory.hpp.