Kagome
Polkadot Runtime Engine in C++17
kagome::storage::changes_trie::ChangesTracker Class Referenceabstract

#include <changes_tracker.hpp>

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

Public Member Functions

virtual ~ChangesTracker ()=default
 
virtual void onBlockExecutionStart (primitives::BlockHash new_parent_hash)=0
 
virtual void onPut (const common::BufferView &key, const common::BufferView &value, bool new_entry)=0
 
virtual void onBlockAdded (const primitives::BlockHash &hash)=0
 
virtual void onRemove (const common::BufferView &key)=0
 

Detailed Description

Stores the information about changes to the storage in accordance with the supplied config. Used to build the changes trie. onChange() must be called every time a persistent change to the node storage is made.

Definition at line 15 of file changes_tracker.hpp.

Constructor & Destructor Documentation

virtual kagome::storage::changes_trie::ChangesTracker::~ChangesTracker ( )
virtualdefault

Member Function Documentation

virtual void kagome::storage::changes_trie::ChangesTracker::onBlockAdded ( const primitives::BlockHash hash)
pure virtual

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

Implemented in kagome::storage::changes_trie::StorageChangesTrackerImpl.

virtual void kagome::storage::changes_trie::ChangesTracker::onBlockExecutionStart ( primitives::BlockHash  new_parent_hash)
pure virtual

Supposed to be called when a block execution starts

Implemented in kagome::storage::changes_trie::StorageChangesTrackerImpl.

virtual void kagome::storage::changes_trie::ChangesTracker::onPut ( const common::BufferView key,
const common::BufferView value,
bool  new_entry 
)
pure virtual

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

Implemented in kagome::storage::changes_trie::StorageChangesTrackerImpl.

virtual void kagome::storage::changes_trie::ChangesTracker::onRemove ( const common::BufferView key)
pure virtual

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

Implemented in kagome::storage::changes_trie::StorageChangesTrackerImpl.


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