Kagome
Polkadot Runtime Engine in C++17
|
#include <babe_config_node.hpp>
Public Member Functions | |
BabeConfigNode ()=default | |
BabeConfigNode (const std::shared_ptr< const BabeConfigNode > &ancestor, primitives::BlockInfo block) | |
std::shared_ptr< BabeConfigNode > | makeDescendant (const primitives::BlockInfo &block, std::optional< EpochNumber > epoch_number=std::nullopt) const |
Static Public Member Functions | |
static std::shared_ptr< BabeConfigNode > | createAsRoot (primitives::BlockInfo block, std::shared_ptr< const primitives::BabeConfiguration > config) |
Public Attributes | |
const primitives::BlockInfo | block {} |
std::weak_ptr< const BabeConfigNode > | parent |
std::vector< std::shared_ptr< BabeConfigNode > > | descendants {} |
consensus::EpochNumber | epoch {} |
bool | epoch_changed = false |
std::shared_ptr< const primitives::BabeConfiguration > | config |
std::optional< std::shared_ptr< const primitives::BabeConfiguration > > | next_config |
Friends | |
friend::scale::ScaleEncoderStream & | operator<< (::scale::ScaleEncoderStream &s, const BabeConfigNode &node) |
friend::scale::ScaleDecoderStream & | operator>> (::scale::ScaleDecoderStream &s, BabeConfigNode &node) |
Definition at line 18 of file babe_config_node.hpp.
|
default |
kagome::consensus::BabeConfigNode::BabeConfigNode | ( | const std::shared_ptr< const BabeConfigNode > & | ancestor, |
primitives::BlockInfo | block | ||
) |
Definition at line 10 of file babe_config_node.cpp.
|
static |
Creates node as root
block | - target block |
config | - config associated with provided block |
Definition at line 17 of file babe_config_node.cpp.
std::shared_ptr< BabeConfigNode > kagome::consensus::BabeConfigNode::makeDescendant | ( | const primitives::BlockInfo & | block, |
std::optional< EpochNumber > | epoch_number = std::nullopt |
||
) | const |
Creates descendant schedule node for block
block | - target block |
epoch_number | - optional number to inform if provided block of other epoch |
Definition at line 27 of file babe_config_node.cpp.
|
friend |
Definition at line 43 of file babe_config_node.hpp.
|
friend |
Definition at line 48 of file babe_config_node.hpp.
const primitives::BlockInfo kagome::consensus::BabeConfigNode::block {} |
Definition at line 54 of file babe_config_node.hpp.
std::shared_ptr<const primitives::BabeConfiguration> kagome::consensus::BabeConfigNode::config |
Definition at line 60 of file babe_config_node.hpp.
std::vector<std::shared_ptr<BabeConfigNode> > kagome::consensus::BabeConfigNode::descendants {} |
Definition at line 56 of file babe_config_node.hpp.
consensus::EpochNumber kagome::consensus::BabeConfigNode::epoch {} |
Definition at line 58 of file babe_config_node.hpp.
bool kagome::consensus::BabeConfigNode::epoch_changed = false |
Definition at line 59 of file babe_config_node.hpp.
std::optional<std::shared_ptr<const primitives::BabeConfiguration> > kagome::consensus::BabeConfigNode::next_config |
Definition at line 62 of file babe_config_node.hpp.
std::weak_ptr<const BabeConfigNode> kagome::consensus::BabeConfigNode::parent |
Definition at line 55 of file babe_config_node.hpp.