6 #ifndef KAGOME_STORAGE_TRIE_SERIALIZER_IMPL 7 #define KAGOME_STORAGE_TRIE_SERIALIZER_IMPL 15 class PolkadotTrieFactory;
16 class TrieStorageBackend;
26 std::shared_ptr<Codec> codec,
27 std::shared_ptr<TrieStorageBackend> backend);
34 outcome::result<std::shared_ptr<PolkadotTrie>>
retrieveTrie(
56 const std::shared_ptr<OpaqueTrieNode> &node)
const;
64 #endif // KAGOME_STORAGE_TRIE_SERIALIZER_IMPL Class represents arbitrary (including empty) byte buffer.
std::shared_ptr< PolkadotTrieFactory > trie_factory_
outcome::result< RootHash > storeTrie(PolkadotTrie &trie) override
~TrieSerializerImpl() override=default
TrieSerializerImpl(std::shared_ptr< PolkadotTrieFactory > factory, std::shared_ptr< Codec > codec, std::shared_ptr< TrieStorageBackend > backend)
outcome::result< std::shared_ptr< PolkadotTrie > > retrieveTrie(const common::Buffer &db_key) const override
std::shared_ptr< TrieStorageBackend > backend_
outcome::result< PolkadotTrie::NodePtr > retrieveNode(const common::Buffer &db_key) const
RootHash getEmptyRootHash() const override
std::shared_ptr< Codec > codec_
outcome::result< RootHash > storeRootNode(TrieNode &node)