Kagome
Polkadot Runtime Engine in C++17
trie_storage.hpp
Go to the documentation of this file.
1 
6 #ifndef KAGOME_STORAGE_TRIE_TRIE_STORAGE
7 #define KAGOME_STORAGE_TRIE_TRIE_STORAGE
8 
9 #include "common/blob.hpp"
11 #include "storage/trie/types.hpp"
12 
13 namespace kagome::storage::trie {
14 
22  class TrieStorage {
23  public:
24  virtual ~TrieStorage() = default;
25 
31  virtual outcome::result<std::unique_ptr<PersistentTrieBatch>>
32  getPersistentBatchAt(const RootHash &root) = 0;
33  virtual outcome::result<std::unique_ptr<EphemeralTrieBatch>>
34  getEphemeralBatchAt(const RootHash &root) const = 0;
35  };
36 
37 } // namespace kagome::storage::trie
38 
39 #endif // KAGOME_STORAGE_TRIE_TRIE_STORAGE
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