Kagome
Polkadot Runtime Engine in C++17
kagome::storage::changes_trie::StorageChangesTrackerImpl Class Reference

#include <storage_changes_tracker_impl.hpp>

Inheritance diagram for kagome::storage::changes_trie::StorageChangesTrackerImpl:
Collaboration diagram for kagome::storage::changes_trie::StorageChangesTrackerImpl:

Public Member Functions

 StorageChangesTrackerImpl (primitives::events::StorageSubscriptionEnginePtr storage_subscription_engine, primitives::events::ChainSubscriptionEnginePtr chain_subscription_engine)
 
 ~StorageChangesTrackerImpl () override=default
 
void onBlockExecutionStart (primitives::BlockHash new_parent_hash) override
 
void onPut (const common::BufferView &key, const common::BufferView &value, bool new_entry) override
 
void onBlockAdded (const primitives::BlockHash &hash) override
 
void onRemove (const common::BufferView &key) override
 
- Public Member Functions inherited from kagome::storage::changes_trie::ChangesTracker
virtual ~ChangesTracker ()=default
 

Private Attributes

std::set< common::Buffer, std::less<> > new_entries_
 
std::map< common::Buffer, std::optional< common::Buffer >, std::less<> > actual_val_
 
primitives::BlockHash parent_hash_
 
primitives::events::StorageSubscriptionEnginePtr storage_subscription_engine_
 
primitives::events::ChainSubscriptionEnginePtr chain_subscription_engine_
 
log::Logger logger_
 

Detailed Description

Definition at line 11 of file storage_changes_tracker_impl.hpp.

Constructor & Destructor Documentation

kagome::storage::changes_trie::StorageChangesTrackerImpl::StorageChangesTrackerImpl ( primitives::events::StorageSubscriptionEnginePtr  storage_subscription_engine,
primitives::events::ChainSubscriptionEnginePtr  chain_subscription_engine 
)

Definition at line 7 of file storage_changes_tracker_impl.cpp.

kagome::storage::changes_trie::StorageChangesTrackerImpl::~StorageChangesTrackerImpl ( )
overridedefault

Member Function Documentation

void kagome::storage::changes_trie::StorageChangesTrackerImpl::onBlockAdded ( const primitives::BlockHash hash)
overridevirtual

Supposed to be called when a block is added to the block tree.

Implements kagome::storage::changes_trie::ChangesTracker.

Definition at line 23 of file storage_changes_tracker_impl.cpp.

void kagome::storage::changes_trie::StorageChangesTrackerImpl::onBlockExecutionStart ( primitives::BlockHash  new_parent_hash)
overridevirtual

Supposed to be called when a block execution starts

Implements kagome::storage::changes_trie::ChangesTracker.

Definition at line 15 of file storage_changes_tracker_impl.cpp.

void kagome::storage::changes_trie::StorageChangesTrackerImpl::onPut ( const common::BufferView key,
const common::BufferView value,
bool  new_entry 
)
overridevirtual

Supposed to be called when an entry is put into the tracked storage

  • new_entry states whether the entry is new, or just an update of a present value

Implements kagome::storage::changes_trie::ChangesTracker.

Definition at line 40 of file storage_changes_tracker_impl.cpp.

void kagome::storage::changes_trie::StorageChangesTrackerImpl::onRemove ( const common::BufferView key)
overridevirtual

Supposed to be called when an entry is removed from the tracked storage

Implements kagome::storage::changes_trie::ChangesTracker.

Definition at line 54 of file storage_changes_tracker_impl.cpp.

Member Data Documentation

std::map<common::Buffer, std::optional<common::Buffer>, std::less<> > kagome::storage::changes_trie::StorageChangesTrackerImpl::actual_val_
private

Definition at line 33 of file storage_changes_tracker_impl.hpp.

primitives::events::ChainSubscriptionEnginePtr kagome::storage::changes_trie::StorageChangesTrackerImpl::chain_subscription_engine_
private

Definition at line 38 of file storage_changes_tracker_impl.hpp.

log::Logger kagome::storage::changes_trie::StorageChangesTrackerImpl::logger_
private

Definition at line 39 of file storage_changes_tracker_impl.hpp.

std::set<common::Buffer, std::less<> > kagome::storage::changes_trie::StorageChangesTrackerImpl::new_entries_
private

Definition at line 30 of file storage_changes_tracker_impl.hpp.

primitives::BlockHash kagome::storage::changes_trie::StorageChangesTrackerImpl::parent_hash_
private

Definition at line 35 of file storage_changes_tracker_impl.hpp.

primitives::events::StorageSubscriptionEnginePtr kagome::storage::changes_trie::StorageChangesTrackerImpl::storage_subscription_engine_
private

Definition at line 37 of file storage_changes_tracker_impl.hpp.


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