Kagome
Polkadot Runtime Engine in C++17
kagome::primitives::InherentData Struct Reference

#include <inherent_data.hpp>

Collaboration diagram for kagome::primitives::InherentData:

Public Member Functions

template<typename T >
outcome::result< void > putData (InherentIdentifier identifier, const T &inherent)
 
template<typename T >
void replaceData (InherentIdentifier identifier, const T &inherent)
 
template<typename T >
outcome::result< T > getData (const InherentIdentifier &identifier) const
 
bool operator== (const InherentData &rhs) const
 
bool operator!= (const InherentData &rhs) const
 

Public Attributes

std::map< InherentIdentifier, common::Bufferdata
 

Detailed Description

Inherent data to include in a block

Definition at line 39 of file inherent_data.hpp.

Member Function Documentation

template<typename T >
outcome::result<T> kagome::primitives::InherentData::getData ( const InherentIdentifier identifier) const
inline
Returns
the data for the requested inherent.

Definition at line 73 of file inherent_data.hpp.

bool kagome::primitives::InherentData::operator!= ( const InherentData rhs) const

Definition at line 26 of file inherent_data.cpp.

bool kagome::primitives::InherentData::operator== ( const InherentData rhs) const

Definition at line 21 of file inherent_data.cpp.

template<typename T >
outcome::result<void> kagome::primitives::InherentData::putData ( InherentIdentifier  identifier,
const T &  inherent 
)
inline

Put data for an inherent into the internal storage.

  • identifier need to be unique, otherwise decoding of these values will not work!
  • inherent encoded data to be stored
    Returns
    success if the data could be inserted an no data for an inherent with the same

Definition at line 49 of file inherent_data.hpp.

template<typename T >
void kagome::primitives::InherentData::replaceData ( InherentIdentifier  identifier,
const T &  inherent 
)
inline

Replace the data for an inherent. If it does not exist, the data is just inserted.

  • inherent encoded data to be stored

Definition at line 65 of file inherent_data.hpp.

Member Data Documentation

std::map<InherentIdentifier, common::Buffer> kagome::primitives::InherentData::data

Definition at line 86 of file inherent_data.hpp.


The documentation for this struct was generated from the following files: