src/storage/trie/trie_storage.hpp
Namespaces
Classes
Source code
#ifndef SUPERGENIUS_STORAGE_TRIE_TRIE_STORAGE
#define SUPERGENIUS_STORAGE_TRIE_TRIE_STORAGE
#include "base/blob.hpp"
#include "storage/trie/trie_batches.hpp"
#include "singleton/IComponent.hpp"
namespace sgns::storage::trie {
class TrieStorage : public IComponent {
public:
~TrieStorage() override = default;
virtual outcome::result<std::unique_ptr<PersistentTrieBatch>>
getPersistentBatch() = 0;
virtual outcome::result<std::unique_ptr<EphemeralTrieBatch>>
getEphemeralBatch() const = 0;
virtual outcome::result<std::unique_ptr<PersistentTrieBatch>>
getPersistentBatchAt(const base::Hash256 &root) = 0;
virtual outcome::result<std::unique_ptr<EphemeralTrieBatch>>
getEphemeralBatchAt(const base::Hash256 &root) const = 0;
virtual base::Buffer getRootHash() const = 0;
};
} // namespace sgns::storage::trie
#endif // SUPERGENIUS_STORAGE_TRIE_TRIE_STORAGE
Updated on 2026-03-04 at 13:10:45 -0800