Kagome
Polkadot Runtime Engine in C++17
kagome::storage::trie::TrieStorage Class Referenceabstract

#include <trie_storage.hpp>

Inheritance diagram for kagome::storage::trie::TrieStorage:
Collaboration diagram for kagome::storage::trie::TrieStorage:

Public Member Functions

virtual ~TrieStorage ()=default
 
virtual outcome::result< std::unique_ptr< PersistentTrieBatch > > getPersistentBatchAt (const RootHash &root)=0
 
virtual outcome::result< std::unique_ptr< EphemeralTrieBatch > > getEphemeralBatchAt (const RootHash &root) const =0
 

Detailed Description

Grants access to the storage in two ways:

  • persistent batch that will written back to the storage after commit() call
  • ephemeral batch, all changes to which are left in memory and thus the main storage is never changed by it

Definition at line 22 of file trie_storage.hpp.

Constructor & Destructor Documentation

virtual kagome::storage::trie::TrieStorage::~TrieStorage ( )
virtualdefault

Member Function Documentation

virtual outcome::result<std::unique_ptr<EphemeralTrieBatch> > kagome::storage::trie::TrieStorage::getEphemeralBatchAt ( const RootHash root) const
pure virtual
virtual outcome::result<std::unique_ptr<PersistentTrieBatch> > kagome::storage::trie::TrieStorage::getPersistentBatchAt ( const RootHash root)
pure virtual

Initializes a batch at the provided state

Warning
if the batch is committed, the trie will still switch to its state, creating a 'fork'

Implemented in kagome::storage::trie::TrieStorageImpl.


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