Kagome
Polkadot Runtime Engine in C++17
|
#include <cached_tree.hpp>
Public Member Functions | |
CachedTree (std::shared_ptr< TreeNode > root, std::shared_ptr< TreeMeta > metadata) | |
void | updateTreeRoot (std::shared_ptr< TreeNode > new_trie_root, primitives::Justification justification) |
void | updateMeta (const std::shared_ptr< TreeNode > &new_node) |
void | removeFromMeta (const std::shared_ptr< TreeNode > &node) |
A reversal of updateMeta - it's called upon block tree branch prunung to remove pruned block from leaves list, update deepest node wptr etc. More... | |
TreeNode const & | getRoot () const |
TreeNode & | getRoot () |
TreeMeta const & | getMetadata () const |
Private Attributes | |
std::shared_ptr< TreeNode > | root_ |
std::shared_ptr< TreeMeta > | metadata_ |
Non-finalized part of block tree
Definition at line 109 of file cached_tree.hpp.
|
inlineexplicit |
Definition at line 111 of file cached_tree.hpp.
const TreeMeta & kagome::blockchain::CachedTree::getMetadata | ( | ) | const |
Definition at line 191 of file cached_tree.cpp.
TreeNode const & kagome::blockchain::CachedTree::getRoot | ( | ) | const |
Definition at line 181 of file cached_tree.cpp.
TreeNode & kagome::blockchain::CachedTree::getRoot | ( | ) |
Definition at line 186 of file cached_tree.cpp.
void kagome::blockchain::CachedTree::removeFromMeta | ( | const std::shared_ptr< TreeNode > & | node | ) |
A reversal of updateMeta - it's called upon block tree branch prunung to remove pruned block from leaves list, update deepest node wptr etc.
node | Removed node |
Definition at line 208 of file cached_tree.cpp.
void kagome::blockchain::CachedTree::updateMeta | ( | const std::shared_ptr< TreeNode > & | new_node | ) |
Definition at line 196 of file cached_tree.cpp.
void kagome::blockchain::CachedTree::updateTreeRoot | ( | std::shared_ptr< TreeNode > | new_trie_root, |
primitives::Justification | justification | ||
) |
Remove nodes in block tree from current tree_ to {
Definition at line 161 of file cached_tree.cpp.
|
private |
Definition at line 143 of file cached_tree.hpp.
|
private |
Definition at line 142 of file cached_tree.hpp.