sgns::blockchain::BlockTreeImpl::TreeNode¶
Inherits from std::enable_shared_from_this< TreeNode >
Public Functions¶
| Name | |
|---|---|
| TreeNode(primitives::BlockHash hash, primitives::BlockNumber depth, std::shared_ptr< TreeNode > parent, bool finalized =false) | |
| std::shared_ptr< TreeNode > | getByHash(const primitives::BlockHash & hash) |
| bool | operator==(const TreeNode & other) const |
| bool | operator!=(const TreeNode & other) const |
Public Attributes¶
| Name | |
|---|---|
| primitives::BlockHash | block_hash |
| primitives::BlockNumber | depth |
| std::weak_ptr< TreeNode > | parent |
| bool | finalized |
| std::vector< std::shared_ptr< TreeNode > > | children |
Detailed Description¶
In-memory light representation of the tree, used for efficiency and usage convenience - we would only ask the database for some info, when directly requested
Public Functions Documentation¶
function TreeNode¶
TreeNode(
primitives::BlockHash hash,
primitives::BlockNumber depth,
std::shared_ptr< TreeNode > parent,
bool finalized =false
)
function getByHash¶
Get a node of the tree, containing block with the specified hash, if it can be found
function operator==¶
function operator!=¶
Public Attributes Documentation¶
variable block_hash¶
variable depth¶
variable parent¶
variable finalized¶
variable children¶
Updated on 2026-04-15 at 11:00:39 -0700