class MerkleTree::Node

Defined in:

merkle_tree_stream.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(index : UInt64, parent : UInt64, size : UInt64, data : Slice(UInt8), hash : Slice(UInt8) | Nil) #

[View source]

Instance Method Detail

def data : Bytes #

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


[View source]
def data=(data : Bytes) #

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


[View source]
def hash : Bytes | Nil #

Hash of the data


[View source]
def hash=(hash : Bytes | Nil) #

Hash of the data


[View source]
def index : UInt64 #

Offset into the flat-tree data structure


[View source]
def index=(index : UInt64) #

Offset into the flat-tree data structure


[View source]
def parent : UInt64 #

Reference to this node's parent node


[View source]
def parent=(parent : UInt64) #

Reference to this node's parent node


[View source]
def size : UInt64 #

Total size of all its child nodes combined


[View source]
def size=(size : UInt64) #

Total size of all its child nodes combined


[View source]