6 #ifndef KAGOME_CORE_BLOCKCHAIN_IMPL_PERSISTENT_MAP_UTIL_HPP 7 #define KAGOME_CORE_BLOCKCHAIN_IMPL_PERSISTENT_MAP_UTIL_HPP 120 #endif // KAGOME_CORE_BLOCKCHAIN_IMPL_PERSISTENT_MAP_UTIL_HPP Class represents arbitrary (including empty) byte buffer.
outcome::result< primitives::BlockNumber > lookupKeyToNumber(const common::BufferView &key)
OUTCOME_HPP_DECLARE_ERROR(kagome::blockchain, KeyValueRepositoryError)
common::Buffer numberAndHashToLookupKey(primitives::BlockNumber number, const common::Hash256 &hash)
common::Buffer numberToIndexKey(primitives::BlockNumber n)
outcome::result< void > putWithPrefix(storage::BufferStorage &map, prefix::Prefix prefix, BlockNumber num, Hash256 block_hash, const common::Buffer &value)
outcome::result< void > putNumberToIndexKey(storage::BufferStorage &map, const primitives::BlockInfo &block)
outcome::result< std::optional< common::Buffer > > getWithPrefix(const storage::BufferStorage &map, prefix::Prefix prefix, const primitives::BlockId &block_id)
boost::variant< BlockHash, BlockNumber > BlockId
Block id is the variant over BlockHash and BlockNumber.
outcome::result< bool > hasWithPrefix(const storage::BufferStorage &map, prefix::Prefix prefix, const primitives::BlockId &block_id)
common::Buffer prependPrefix(common::BufferView key, prefix::Prefix key_column)