Kagome
Polkadot Runtime Engine in C++17
|
Node of scheduler tree. Contains actual authorities for the accorded block and all its descendant blocks until any changes are applied. May contain one of the changes. More...
#include <schedule_node.hpp>
Classes | |
struct | ForcedChange |
struct | Pause |
struct | Resume |
struct | ScheduledChange |
Public Types | |
using | NoAction = Empty |
Public Member Functions | |
ScheduleNode ()=default | |
ScheduleNode (const std::shared_ptr< const ScheduleNode > &ancestor, primitives::BlockInfo block) | |
void | adjust (IsBlockFinalized finalized) |
std::shared_ptr< ScheduleNode > | makeDescendant (const primitives::BlockInfo &block, IsBlockFinalized finalized) const |
Static Public Member Functions | |
static std::shared_ptr< ScheduleNode > | createAsRoot (std::shared_ptr< const primitives::AuthoritySet > current_authorities, primitives::BlockInfo block) |
Public Attributes | |
const primitives::BlockInfo | current_block {} |
std::weak_ptr< const ScheduleNode > | parent |
std::vector< std::shared_ptr< ScheduleNode > > | descendants {} |
boost::variant< NoAction, ScheduledChange, ForcedChange, Pause, Resume > | action |
std::shared_ptr< const primitives::AuthoritySet > | current_authorities |
bool | enabled = true |
Friends | |
friend::scale::ScaleEncoderStream & | operator<< (::scale::ScaleEncoderStream &s, const ScheduleNode &node) |
friend::scale::ScaleDecoderStream & | operator>> (::scale::ScaleDecoderStream &s, ScheduleNode &node) |
Node of scheduler tree. Contains actual authorities for the accorded block and all its descendant blocks until any changes are applied. May contain one of the changes.
Definition at line 24 of file schedule_node.hpp.
Definition at line 46 of file schedule_node.hpp.
|
default |
kagome::authority::ScheduleNode::ScheduleNode | ( | const std::shared_ptr< const ScheduleNode > & | ancestor, |
primitives::BlockInfo | block | ||
) |
Definition at line 11 of file schedule_node.cpp.
void kagome::authority::ScheduleNode::adjust | ( | IsBlockFinalized | finalized | ) |
Definition at line 27 of file schedule_node.cpp.
|
static |
std::shared_ptr< ScheduleNode > kagome::authority::ScheduleNode::makeDescendant | ( | const primitives::BlockInfo & | block, |
IsBlockFinalized | finalized | ||
) | const |
Creates descendant schedule node for block
block | - target block |
finalized | - true if block is finalized |
Definition at line 55 of file schedule_node.cpp.
|
friend |
Definition at line 75 of file schedule_node.hpp.
|
friend |
Definition at line 81 of file schedule_node.hpp.
boost::variant<NoAction, ScheduledChange, ForcedChange, Pause, Resume> kagome::authority::ScheduleNode::action |
Definition at line 92 of file schedule_node.hpp.
std::shared_ptr<const primitives::AuthoritySet> kagome::authority::ScheduleNode::current_authorities |
Definition at line 93 of file schedule_node.hpp.
const primitives::BlockInfo kagome::authority::ScheduleNode::current_block {} |
Definition at line 88 of file schedule_node.hpp.
std::vector<std::shared_ptr<ScheduleNode> > kagome::authority::ScheduleNode::descendants {} |
Definition at line 90 of file schedule_node.hpp.
bool kagome::authority::ScheduleNode::enabled = true |
Definition at line 94 of file schedule_node.hpp.
std::weak_ptr<const ScheduleNode> kagome::authority::ScheduleNode::parent |
Definition at line 89 of file schedule_node.hpp.