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

#include <trie_serializer.hpp>

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

Public Member Functions

virtual ~TrieSerializer ()=default
 
virtual RootHash getEmptyRootHash () const =0
 
virtual outcome::result< RootHashstoreTrie (PolkadotTrie &trie)=0
 
virtual outcome::result< std::shared_ptr< PolkadotTrie > > retrieveTrie (const common::Buffer &db_key) const =0
 

Detailed Description

Serializes PolkadotTrie and stores it in an external storage

Definition at line 18 of file trie_serializer.hpp.

Constructor & Destructor Documentation

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

Member Function Documentation

virtual RootHash kagome::storage::trie::TrieSerializer::getEmptyRootHash ( ) const
pure virtual
Returns
root hash of an empty trie

Implemented in kagome::storage::trie::TrieSerializerImpl.

virtual outcome::result<std::shared_ptr<PolkadotTrie> > kagome::storage::trie::TrieSerializer::retrieveTrie ( const common::Buffer db_key) const
pure virtual

Fetches a trie from the storage. A nullptr is returned in case that there is no entry for provided key.

Implemented in kagome::storage::trie::TrieSerializerImpl.

virtual outcome::result<RootHash> kagome::storage::trie::TrieSerializer::storeTrie ( PolkadotTrie trie)
pure virtual

Writes a trie to a storage, recursively storing its nodes.

Implemented in kagome::storage::trie::TrieSerializerImpl.


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