Kagome
Polkadot Runtime Engine in C++17
common.hpp
Go to the documentation of this file.
1 
6 #ifndef KAGOME_BLOCKCHAIN_COMMON_HPP
7 #define KAGOME_BLOCKCHAIN_COMMON_HPP
8 
9 #include "common/buffer.hpp"
10 #include "outcome/outcome.hpp"
11 #include "primitives/block_id.hpp"
13 #include "storage/trie/types.hpp"
14 
15 namespace kagome::blockchain {
16 
17  using ReadableBufferStorage =
19 
24  outcome::result<std::optional<common::Buffer>> idToLookupKey(
25  const ReadableBufferStorage &map, const primitives::BlockId &id);
26 
32  const std::vector<std::pair<common::Buffer, common::Buffer>> &key_vals);
33 } // namespace kagome::blockchain
34 
35 #endif // KAGOME_BLOCKCHAIN_COMMON_HPP
outcome::result< std::optional< common::Buffer > > idToLookupKey(const ReadableBufferStorage &map, const primitives::BlockId &id)
Definition: common.cpp:15
storage::face::ReadableStorage< common::BufferView, common::Buffer > ReadableBufferStorage
Definition: common.hpp:18
boost::variant< BlockHash, BlockNumber > BlockId
Block id is the variant over BlockHash and BlockNumber.
Definition: block_id.hpp:18
storage::trie::RootHash trieRoot(const std::vector< std::pair< common::Buffer, common::Buffer >> &key_vals)
Definition: common.cpp:32