Kagome
Polkadot Runtime Engine in C++17
kagome::parachain::AvailabilityStoreImpl Class Reference

#include <store_impl.hpp>

Inheritance diagram for kagome::parachain::AvailabilityStoreImpl:
Collaboration diagram for kagome::parachain::AvailabilityStoreImpl:

Classes

struct  PerCandidate
 

Public Member Functions

 ~AvailabilityStoreImpl () override=default
 
bool hasChunk (const CandidateHash &candidate_hash, ValidatorIndex index) override
 
bool hasPov (const CandidateHash &candidate_hash) override
 
bool hasData (const CandidateHash &candidate_hash) override
 
std::optional< ErasureChunkgetChunk (const CandidateHash &candidate_hash, ValidatorIndex index) override
 
std::optional< ParachainBlockgetPov (const CandidateHash &candidate_hash) override
 
void putChunk (const CandidateHash &candidate_hash, const ErasureChunk &chunk) override
 
void putPov (const CandidateHash &candidate_hash, const ParachainBlock &pov) override
 
void putData (const CandidateHash &candidate_hash, const PersistedValidationData &data) override
 
- Public Member Functions inherited from kagome::parachain::AvailabilityStore
virtual ~AvailabilityStore ()=default
 
virtual bool hasChunk (const CandidateHash &candidate_hash, ValidatorIndex index)=0
 Has ErasureChunk. More...
 
virtual bool hasPov (const CandidateHash &candidate_hash)=0
 Has PoV. More...
 
virtual bool hasData (const CandidateHash &candidate_hash)=0
 Has PersistedValidationData. More...
 
virtual std::optional< ErasureChunkgetChunk (const CandidateHash &candidate_hash, ValidatorIndex index)=0
 Get ErasureChunk. More...
 
virtual std::optional< ParachainBlockgetPov (const CandidateHash &candidate_hash)=0
 Get PoV. More...
 
virtual void putChunk (const CandidateHash &candidate_hash, const ErasureChunk &chunk)=0
 Store ErasureChunk. More...
 
virtual void putPov (const CandidateHash &candidate_hash, const ParachainBlock &pov)=0
 Store PoV. More...
 
virtual void putData (const CandidateHash &candidate_hash, const PersistedValidationData &data)=0
 Store PersistedValidationData. More...
 

Private Attributes

std::unordered_map< CandidateHash, PerCandidateper_candidate_
 

Additional Inherited Members

- Public Types inherited from kagome::parachain::AvailabilityStore
using CandidateHash = network::CandidateHash
 
using ValidatorIndex = network::ValidatorIndex
 
using ErasureChunk = network::ErasureChunk
 
using ParachainBlock = network::ParachainBlock
 
using PersistedValidationData = runtime::PersistedValidationData
 

Detailed Description

Definition at line 14 of file store_impl.hpp.


Class Documentation

struct kagome::parachain::AvailabilityStoreImpl::PerCandidate

Definition at line 34 of file store_impl.hpp.

Collaboration diagram for kagome::parachain::AvailabilityStoreImpl::PerCandidate:
Class Members
unordered_map< ValidatorIndex,
ErasureChunk >
chunks
optional< PersistedValidationData > data
optional< ParachainBlock > pov

Constructor & Destructor Documentation

kagome::parachain::AvailabilityStoreImpl::~AvailabilityStoreImpl ( )
overridedefault

Member Function Documentation

std::optional< AvailabilityStore::ErasureChunk > kagome::parachain::AvailabilityStoreImpl::getChunk ( const CandidateHash candidate_hash,
ValidatorIndex  index 
)
override

Definition at line 35 of file store_impl.cpp.

std::optional< AvailabilityStore::ParachainBlock > kagome::parachain::AvailabilityStoreImpl::getPov ( const CandidateHash candidate_hash)
override

Definition at line 49 of file store_impl.cpp.

bool kagome::parachain::AvailabilityStoreImpl::hasChunk ( const CandidateHash candidate_hash,
ValidatorIndex  index 
)
override

Definition at line 9 of file store_impl.cpp.

bool kagome::parachain::AvailabilityStoreImpl::hasData ( const CandidateHash candidate_hash)
override

Definition at line 26 of file store_impl.cpp.

bool kagome::parachain::AvailabilityStoreImpl::hasPov ( const CandidateHash candidate_hash)
override

Definition at line 18 of file store_impl.cpp.

void kagome::parachain::AvailabilityStoreImpl::putChunk ( const CandidateHash candidate_hash,
const ErasureChunk chunk 
)
override

Definition at line 57 of file store_impl.cpp.

void kagome::parachain::AvailabilityStoreImpl::putData ( const CandidateHash candidate_hash,
const PersistedValidationData data 
)
override

Definition at line 67 of file store_impl.cpp.

void kagome::parachain::AvailabilityStoreImpl::putPov ( const CandidateHash candidate_hash,
const ParachainBlock pov 
)
override

Definition at line 62 of file store_impl.cpp.

Member Data Documentation

std::unordered_map<CandidateHash, PerCandidate> kagome::parachain::AvailabilityStoreImpl::per_candidate_
private

Definition at line 40 of file store_impl.hpp.


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