Kagome
Polkadot Runtime Engine in C++17
storage_util.hpp File Reference
Include dependency graph for storage_util.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 kagome::blockchain
 
 kagome::blockchain::prefix
 

Enumerations

enum  kagome::blockchain::prefix::Prefix : uint8_t { kagome::blockchain::prefix::ID_TO_LOOKUP_KEY = 3, kagome::blockchain::prefix::HEADER = 4, kagome::blockchain::prefix::BLOCK_DATA = 5, kagome::blockchain::prefix::TRIE_NODE = 7 }
 
enum  kagome::blockchain::KeyValueRepositoryError { kagome::blockchain::KeyValueRepositoryError::INVALID_KEY = 1 }
 

Functions

outcome::result< void > kagome::blockchain::putNumberToIndexKey (storage::BufferStorage &map, const primitives::BlockInfo &block)
 
common::Buffer kagome::blockchain::prependPrefix (common::BufferView key, prefix::Prefix key_column)
 
outcome::result< void > kagome::blockchain::putWithPrefix (storage::BufferStorage &map, prefix::Prefix prefix, primitives::BlockNumber num, common::Hash256 block_hash, const common::Buffer &value)
 
outcome::result< bool > kagome::blockchain::hasWithPrefix (const storage::BufferStorage &map, prefix::Prefix prefix, const primitives::BlockId &block_id)
 
outcome::result< std::optional< common::Buffer > > kagome::blockchain::getWithPrefix (const storage::BufferStorage &map, prefix::Prefix prefix, const primitives::BlockId &block_id)
 
common::Buffer kagome::blockchain::numberToIndexKey (primitives::BlockNumber n)
 
common::Buffer kagome::blockchain::numberAndHashToLookupKey (primitives::BlockNumber number, const common::Hash256 &hash)
 
outcome::result< primitives::BlockNumber > kagome::blockchain::lookupKeyToNumber (const common::BufferView &key)
 
 OUTCOME_HPP_DECLARE_ERROR (kagome::blockchain, KeyValueRepositoryError)
 

Function Documentation

OUTCOME_HPP_DECLARE_ERROR ( kagome::blockchain  ,
KeyValueRepositoryError   
)