6 #ifndef KAGOME_ORDERED_TRIE_HASH_HPP 7 #define KAGOME_ORDERED_TRIE_HASH_HPP 11 #include "scale/scale.hpp" 24 template <
typename It>
31 static const auto empty_root =
40 OUTCOME_TRY(enc, scale::encode(key++));
48 template <
typename ContainerType>
50 const ContainerType &container) {
56 #endif // KAGOME_ORDERED_TRIE_HASH_HPP Class represents arbitrary (including empty) byte buffer.
SLBuffer & put(std::string_view view)
Put a string into byte buffer.
scale::CompactInteger CompactInteger
outcome::result< common::Buffer > encodeNode(const Node &node) const
Encode node to byte representation.
common::Hash256 hash256(const BufferView &buf) const override
Get the hash of a node.
NodePtr getRoot() override
outcome::result< common::Buffer > calculateOrderedTrieHash(const It &begin, const It &end)
outcome::result< void > put(const common::BufferView &key, const common::Buffer &value) override
Store value by key.