Kagome
Polkadot Runtime Engine in C++17
kagome::consensus::BabeBlockHeader Struct Reference

#include <babe_block_header.hpp>

Collaboration diagram for kagome::consensus::BabeBlockHeader:

Public Member Functions

SlotType slotType () const
 
bool needVRFCheck () const
 
bool needVRFWithThresholdCheck () const
 
bool isProducedInSecondarySlot () const
 

Public Attributes

SlotType slot_assignment_type {}
 
primitives::AuthorityIndex authority_index
 authority index of the producer More...
 
BabeSlotNumber slot_number
 slot, in which the block was produced More...
 
crypto::VRFOutput vrf_output {}
 output of VRF function More...
 

Friends

friend::scale::ScaleEncoderStream & operator<< (::scale::ScaleEncoderStream &s, const BabeBlockHeader &bh)
 outputs object of type BabeBlockHeader to stream More...
 
friend::scale::ScaleDecoderStream & operator>> (::scale::ScaleDecoderStream &s, BabeBlockHeader &bh)
 decodes object of type BabeBlockHeader from stream More...
 

Detailed Description

Contains specific data, needed in BABE for validation

See also
https://github.com/paritytech/substrate/blob/polkadot-v0.9.8/primitives/consensus/babe/src/digests.rs#L74

Definition at line 24 of file babe_block_header.hpp.

Member Function Documentation

bool kagome::consensus::BabeBlockHeader::isProducedInSecondarySlot ( ) const
inline

Definition at line 49 of file babe_block_header.hpp.

bool kagome::consensus::BabeBlockHeader::needVRFCheck ( ) const
inline

Definition at line 40 of file babe_block_header.hpp.

bool kagome::consensus::BabeBlockHeader::needVRFWithThresholdCheck ( ) const
inline

Definition at line 45 of file babe_block_header.hpp.

SlotType kagome::consensus::BabeBlockHeader::slotType ( ) const
inline

Definition at line 36 of file babe_block_header.hpp.

Friends And Related Function Documentation

::scale::ScaleEncoderStream& operator<< ( ::scale::ScaleEncoderStream &  s,
const BabeBlockHeader bh 
)
friend

outputs object of type BabeBlockHeader to stream

Parameters
sstream reference
vvalue to output
Returns
reference to stream

Definition at line 60 of file babe_block_header.hpp.

::scale::ScaleDecoderStream& operator>> ( ::scale::ScaleDecoderStream &  s,
BabeBlockHeader bh 
)
friend

decodes object of type BabeBlockHeader from stream

Parameters
sstream reference
vvalue to output
Returns
reference to stream

Definition at line 75 of file babe_block_header.hpp.

Member Data Documentation

primitives::AuthorityIndex kagome::consensus::BabeBlockHeader::authority_index

authority index of the producer

Definition at line 28 of file babe_block_header.hpp.

SlotType kagome::consensus::BabeBlockHeader::slot_assignment_type {}

Definition at line 25 of file babe_block_header.hpp.

BabeSlotNumber kagome::consensus::BabeBlockHeader::slot_number

slot, in which the block was produced

Definition at line 31 of file babe_block_header.hpp.

crypto::VRFOutput kagome::consensus::BabeBlockHeader::vrf_output {}

output of VRF function

Definition at line 34 of file babe_block_header.hpp.


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