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

#include <storage_code_provider.hpp>

Inheritance diagram for kagome::runtime::StorageCodeProvider:
Collaboration diagram for kagome::runtime::StorageCodeProvider:

Public Member Functions

 ~StorageCodeProvider () override=default
 
 StorageCodeProvider (std::shared_ptr< const storage::trie::TrieStorage > storage, std::shared_ptr< RuntimeUpgradeTracker > runtime_upgrade_tracker, std::shared_ptr< const CodeSubstituteBlockIds > code_substitutes, std::shared_ptr< application::ChainSpec > chain_spec)
 
outcome::result< gsl::span< const uint8_t > > getCodeAt (const storage::trie::RootHash &state) const override
 
- Public Member Functions inherited from kagome::runtime::RuntimeCodeProvider
virtual ~RuntimeCodeProvider ()=default
 

Private Member Functions

outcome::result< void > setCodeFromBatch (const storage::trie::EphemeralTrieBatch &batch) const
 

Private Attributes

std::shared_ptr< const storage::trie::TrieStoragestorage_
 
std::shared_ptr< RuntimeUpgradeTrackerruntime_upgrade_tracker_
 
std::shared_ptr< const CodeSubstituteBlockIds > known_code_substitutes_
 
std::shared_ptr< application::ChainSpecchain_spec_
 
common::Buffer cached_code_
 
storage::trie::RootHash last_state_root_
 
log::Logger logger_
 

Detailed Description

Definition at line 24 of file storage_code_provider.hpp.

Constructor & Destructor Documentation

kagome::runtime::StorageCodeProvider::~StorageCodeProvider ( )
overridedefault
kagome::runtime::StorageCodeProvider::StorageCodeProvider ( std::shared_ptr< const storage::trie::TrieStorage storage,
std::shared_ptr< RuntimeUpgradeTracker runtime_upgrade_tracker,
std::shared_ptr< const CodeSubstituteBlockIds >  code_substitutes,
std::shared_ptr< application::ChainSpec chain_spec 
)
explicit

Definition at line 18 of file storage_code_provider.cpp.

Member Function Documentation

outcome::result< gsl::span< const uint8_t > > kagome::runtime::StorageCodeProvider::getCodeAt ( const storage::trie::RootHash state) const
overridevirtual

Implements kagome::runtime::RuntimeCodeProvider.

Definition at line 33 of file storage_code_provider.cpp.

outcome::result< void > kagome::runtime::StorageCodeProvider::setCodeFromBatch ( const storage::trie::EphemeralTrieBatch batch) const
private

Definition at line 55 of file storage_code_provider.cpp.

Member Data Documentation

common::Buffer kagome::runtime::StorageCodeProvider::cached_code_
mutableprivate

Definition at line 44 of file storage_code_provider.hpp.

std::shared_ptr<application::ChainSpec> kagome::runtime::StorageCodeProvider::chain_spec_
private

Definition at line 43 of file storage_code_provider.hpp.

std::shared_ptr<const CodeSubstituteBlockIds> kagome::runtime::StorageCodeProvider::known_code_substitutes_
private

Definition at line 42 of file storage_code_provider.hpp.

storage::trie::RootHash kagome::runtime::StorageCodeProvider::last_state_root_
mutableprivate

Definition at line 45 of file storage_code_provider.hpp.

log::Logger kagome::runtime::StorageCodeProvider::logger_
private

Definition at line 46 of file storage_code_provider.hpp.

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

Definition at line 41 of file storage_code_provider.hpp.

std::shared_ptr<const storage::trie::TrieStorage> kagome::runtime::StorageCodeProvider::storage_
private

Definition at line 40 of file storage_code_provider.hpp.


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