Kagome
Polkadot Runtime Engine in C++17
|
#include <block_storage.hpp>
Public Member Functions | |
virtual | ~BlockStorage ()=default |
virtual outcome::result< std::vector< primitives::BlockHash > > | getBlockTreeLeaves () const =0 |
virtual outcome::result< void > | setBlockTreeLeaves (std::vector< primitives::BlockHash > leaves)=0 |
virtual outcome::result< bool > | hasBlockHeader (const primitives::BlockId &id) const =0 |
Check if header existing by provided block {. More... | |
virtual outcome::result< std::optional< primitives::BlockHeader > > | getBlockHeader (const primitives::BlockId &id) const =0 |
virtual outcome::result< std::optional< primitives::BlockBody > > | getBlockBody (const primitives::BlockId &id) const =0 |
virtual outcome::result< std::optional< primitives::BlockData > > | getBlockData (const primitives::BlockId &id) const =0 |
virtual outcome::result< std::optional< primitives::Justification > > | getJustification (const primitives::BlockId &block) const =0 |
virtual outcome::result< void > | putNumberToIndexKey (const primitives::BlockInfo &block)=0 |
virtual outcome::result< primitives::BlockHash > | putBlockHeader (const primitives::BlockHeader &header)=0 |
virtual outcome::result< void > | putBlockData (primitives::BlockNumber, const primitives::BlockData &block_data)=0 |
virtual outcome::result< void > | removeBlockData (primitives::BlockNumber block_number, const primitives::BlockDataFlags &remove_flags)=0 |
virtual outcome::result< primitives::BlockHash > | putBlock (const primitives::Block &block)=0 |
virtual outcome::result< void > | putJustification (const primitives::Justification &justification, const primitives::BlockHash &hash, primitives::BlockNumber number)=0 |
virtual outcome::result< void > | removeJustification (const primitives::BlockHash &hash, primitives::BlockNumber number)=0 |
virtual outcome::result< primitives::BlockInfo > | getLastFinalized () const =0 |
virtual outcome::result< void > | removeBlock (const primitives::BlockInfo &block)=0 |
A wrapper for a storage of blocks Provides a convenient interface to work with it
Definition at line 20 of file block_storage.hpp.
|
virtualdefault |
|
pure virtual |
Tries to get block body by {
id} |
Implemented in kagome::blockchain::BlockStorageImpl.
|
pure virtual |
Tries to get block data by {
id} |
Implemented in kagome::blockchain::BlockStorageImpl.
|
pure virtual |
Tries to get block header by {
id} |
Implemented in kagome::blockchain::BlockStorageImpl.
|
pure virtual |
Obtains leaves of block tree
Implemented in kagome::blockchain::BlockStorageImpl.
|
pure virtual |
Tries to get justification of block finality by {
id} |
Implemented in kagome::blockchain::BlockStorageImpl.
|
pure virtual |
Get the last finalized block
Implemented in kagome::blockchain::BlockStorageImpl.
|
pure virtual |
Check if header existing by provided block {.
id} |
Implemented in kagome::blockchain::BlockStorageImpl.
|
pure virtual |
Saves {
block} | to block storage |
Implemented in kagome::blockchain::BlockStorageImpl.
|
pure virtual |
Saves {
data} | of block with { |
number} | to block storage |
Implemented in kagome::blockchain::BlockStorageImpl.
|
pure virtual |
Saves block header {
header} | to block storage |
Implemented in kagome::blockchain::BlockStorageImpl.
|
pure virtual |
Saves {
justification} | of block with { |
number} | and { |
hash} | to block storage |
Implemented in kagome::blockchain::BlockStorageImpl.
|
pure virtual |
Saves number-to-block_lookup_key for {
block} | to block storage |
Implemented in kagome::blockchain::BlockStorageImpl.
|
pure virtual |
Removes all data of block {
block} | from block storage |
Implemented in kagome::blockchain::BlockStorageImpl.
|
pure virtual |
Removes data parts from storage
Implemented in kagome::blockchain::BlockStorageImpl.
|
pure virtual |
Removes {
justification} | of block with { |
number} | and { |
hash} | from block storage |
Implemented in kagome::blockchain::BlockStorageImpl.
|
pure virtual |
Saves provided block tree {
leaves} |
Implemented in kagome::blockchain::BlockStorageImpl.