6 #ifndef KAGOME_CONSENSUS_BABECONFIGNODE 7 #define KAGOME_CONSENSUS_BABECONFIGNODE 12 #include "scale/scale.hpp" 19 :
public std::enable_shared_from_this<BabeConfigNode> {
23 BabeConfigNode(
const std::shared_ptr<const BabeConfigNode> &ancestor,
32 std::shared_ptr<const primitives::BabeConfiguration>
config);
41 std::optional<EpochNumber> epoch_number = std::nullopt)
const;
55 std::weak_ptr<const BabeConfigNode>
parent;
60 std::shared_ptr<const primitives::BabeConfiguration>
config;
61 std::optional<std::shared_ptr<const primitives::BabeConfiguration>>
67 #endif // KAGOME_CONSENSUS_BABECONFIGNODE std::optional< std::shared_ptr< const primitives::BabeConfiguration > > next_config
std::shared_ptr< const primitives::BabeConfiguration > config
consensus::EpochNumber epoch
const primitives::BlockInfo block
std::vector< std::shared_ptr< BabeConfigNode > > descendants
std::weak_ptr< const BabeConfigNode > parent
std::shared_ptr< BabeConfigNode > makeDescendant(const primitives::BlockInfo &block, std::optional< EpochNumber > epoch_number=std::nullopt) const
static std::shared_ptr< BabeConfigNode > createAsRoot(primitives::BlockInfo block, std::shared_ptr< const primitives::BabeConfiguration > config)
uint64_t EpochNumber
number of the epoch in the Babe production
friend::scale::ScaleDecoderStream & operator>>(::scale::ScaleDecoderStream &s, BabeConfigNode &node)
friend::scale::ScaleEncoderStream & operator<<(::scale::ScaleEncoderStream &s, const BabeConfigNode &node)