Kagome
Polkadot Runtime Engine in C++17
|
#include <runtime_upgrade_tracker_impl.hpp>
Classes | |
struct | RuntimeUpgradeData |
Public Member Functions | |
void | subscribeToBlockchainEvents (std::shared_ptr< primitives::events::ChainSubscriptionEngine > chain_sub_engine, std::shared_ptr< const blockchain::BlockTree > block_tree) |
outcome::result< storage::trie::RootHash > | getLastCodeUpdateState (const primitives::BlockInfo &block) override |
outcome::result< primitives::BlockInfo > | getLastCodeUpdateBlockInfo (const storage::trie::RootHash &state) const override |
Public Member Functions inherited from kagome::runtime::RuntimeUpgradeTracker | |
virtual | ~RuntimeUpgradeTracker ()=default |
Static Public Member Functions | |
static outcome::result< std::unique_ptr< RuntimeUpgradeTrackerImpl > > | create (std::shared_ptr< const blockchain::BlockHeaderRepository > header_repo, std::shared_ptr< storage::BufferStorage > storage, std::shared_ptr< const primitives::CodeSubstituteBlockIds > code_substitutes, std::shared_ptr< blockchain::BlockStorage > block_storage) |
Private Member Functions | |
RuntimeUpgradeTrackerImpl (std::shared_ptr< const blockchain::BlockHeaderRepository > header_repo, std::shared_ptr< storage::BufferStorage > storage, std::shared_ptr< const primitives::CodeSubstituteBlockIds > code_substitutes, std::vector< RuntimeUpgradeData > &&saved_data, std::shared_ptr< blockchain::BlockStorage > block_storage) | |
outcome::result< bool > | isStateInChain (const primitives::BlockInfo &state, const primitives::BlockInfo &chain_end) const noexcept |
outcome::result< std::optional< storage::trie::RootHash > > | findProperFork (const primitives::BlockInfo &block, std::vector< RuntimeUpgradeData >::const_reverse_iterator latest_upgrade_it) const |
bool | hasCodeSubstitute (const kagome::primitives::BlockInfo &block_info) const |
outcome::result< storage::trie::RootHash > | push (const primitives::BlockHash &hash) |
void | save () |
Private Attributes | |
std::vector< RuntimeUpgradeData > | runtime_upgrades_ |
std::shared_ptr< primitives::events::ChainEventSubscriber > | chain_subscription_ |
std::shared_ptr< const blockchain::BlockTree > | block_tree_ |
std::shared_ptr< const blockchain::BlockHeaderRepository > | header_repo_ |
std::shared_ptr< storage::BufferStorage > | storage_ |
std::shared_ptr< const primitives::CodeSubstituteBlockIds > | known_code_substitutes_ |
std::shared_ptr< blockchain::BlockStorage > | block_storage_ |
log::Logger | logger_ |
Definition at line 29 of file runtime_upgrade_tracker_impl.hpp.
|
private |
Definition at line 46 of file runtime_upgrade_tracker_impl.cpp.
|
static |
Performs a storage read to fetch saved upgrade states on initialization, which may fail, thus construction only from a factory method
Definition at line 17 of file runtime_upgrade_tracker_impl.cpp.
|
private |
Definition at line 90 of file runtime_upgrade_tracker_impl.cpp.
|
overridevirtual |
Implements kagome::runtime::RuntimeUpgradeTracker.
Definition at line 172 of file runtime_upgrade_tracker_impl.cpp.
|
overridevirtual |
block,where | runtime upgrade happened |
Implements kagome::runtime::RuntimeUpgradeTracker.
Definition at line 111 of file runtime_upgrade_tracker_impl.cpp.
|
private |
Definition at line 60 of file runtime_upgrade_tracker_impl.cpp.
|
privatenoexcept |
Definition at line 65 of file runtime_upgrade_tracker_impl.cpp.
|
private |
Definition at line 218 of file runtime_upgrade_tracker_impl.cpp.
|
private |
Definition at line 232 of file runtime_upgrade_tracker_impl.cpp.
void kagome::runtime::RuntimeUpgradeTrackerImpl::subscribeToBlockchainEvents | ( | std::shared_ptr< primitives::events::ChainSubscriptionEngine > | chain_sub_engine, |
std::shared_ptr< const blockchain::BlockTree > | block_tree | ||
) |
Definition at line 184 of file runtime_upgrade_tracker_impl.cpp.
|
private |
Definition at line 104 of file runtime_upgrade_tracker_impl.hpp.
|
private |
Definition at line 99 of file runtime_upgrade_tracker_impl.hpp.
|
private |
Definition at line 98 of file runtime_upgrade_tracker_impl.hpp.
|
private |
Definition at line 100 of file runtime_upgrade_tracker_impl.hpp.
|
private |
Definition at line 103 of file runtime_upgrade_tracker_impl.hpp.
|
private |
Definition at line 105 of file runtime_upgrade_tracker_impl.hpp.
|
private |
Definition at line 95 of file runtime_upgrade_tracker_impl.hpp.
|
private |
Definition at line 101 of file runtime_upgrade_tracker_impl.hpp.