6 #ifndef KAGOME_CONSENSUS_AUTHORITIES_SCHEDULE_NODE 7 #define KAGOME_CONSENSUS_AUTHORITIES_SCHEDULE_NODE 9 #include <boost/variant.hpp> 24 class ScheduleNode :
public std::enable_shared_from_this<ScheduleNode> {
28 ScheduleNode(
const std::shared_ptr<const ScheduleNode> &ancestor,
59 size_t delay_length{};
76 ::scale::ScaleEncoderStream &s,
const ScheduleNode &node) {
89 std::weak_ptr<const ScheduleNode>
parent;
91 boost::variant<NoAction, ScheduledChange, ForcedChange, Pause, Resume>
99 #endif // KAGOME_CONSENSUS_AUTHORITIES_SCHEDULE_NODE
friend::scale::ScaleEncoderStream & operator<<(::scale::ScaleEncoderStream &s, const ScheduleNode &node)
friend::scale::ScaleDecoderStream & operator>>(::scale::ScaleDecoderStream &s, ScheduleNode &node)
std::weak_ptr< const ScheduleNode > parent
std::shared_ptr< const primitives::AuthoritySet > current_authorities
std::shared_ptr< const primitives::AuthoritySet > new_authorities
const primitives::BlockInfo current_block
std::shared_ptr< ScheduleNode > makeDescendant(const primitives::BlockInfo &block, IsBlockFinalized finalized) const
std::vector< std::shared_ptr< ScheduleNode > > descendants
static std::shared_ptr< ScheduleNode > createAsRoot(std::shared_ptr< const primitives::AuthoritySet > current_authorities, primitives::BlockInfo block)
void adjust(IsBlockFinalized finalized)
boost::variant< NoAction, ScheduledChange, ForcedChange, Pause, Resume > action
primitives::BlockNumber applied_block
Node of scheduler tree. Contains actual authorities for the accorded block and all its descendant blo...
Tagged< bool, struct IsBlockFinalizedTag > IsBlockFinalized