class

MerkleTree::Node

Inherits Reference < Object

Constructors

new(index : UInt64, parent : UInt64, size : UInt64, data : Slice(UInt8), hash : Slice(UInt8) | Nil)
Source

Instance methods

data

Data if it's a leaf node, otherwise empty bytes

Source
data=(data : Bytes)

Data if it's a leaf node, otherwise empty bytes

Source
hash

Hash of the data

Source
hash=(hash : Bytes | Nil)

Hash of the data

Source
index

Offset into the flat-tree data structure

Source
index=(index : UInt64)

Offset into the flat-tree data structure

Source
parent

Reference to this node's parent node

Source
parent=(parent : UInt64)

Reference to this node's parent node

Source
size

Total size of all its child nodes combined

Source
size=(size : UInt64)

Total size of all its child nodes combined

Source