class MerkleTree::Node
- MerkleTree::Node
- Reference
- Object
Defined in:
merkle_tree_stream.crConstructors
- .new(index : UInt64, parent : UInt64, size : UInt64, data : Slice(UInt8), hash : Slice(UInt8) | Nil)
Instance Method Summary
-
#data : Bytes
Data if it's a leaf node, otherwise empty bytes
-
#data=(data : Bytes)
Data if it's a leaf node, otherwise empty bytes
-
#hash : Bytes | Nil
Hash of the data
-
#hash=(hash : Bytes | Nil)
Hash of the data
-
#index : UInt64
Offset into the flat-tree data structure
-
#index=(index : UInt64)
Offset into the flat-tree data structure
-
#parent : UInt64
Reference to this node's parent node
-
#parent=(parent : UInt64)
Reference to this node's parent node
-
#size : UInt64
Total size of all its child nodes combined
-
#size=(size : UInt64)
Total size of all its child nodes combined
Constructor Detail
def self.new(index : UInt64, parent : UInt64, size : UInt64, data : Slice(UInt8), hash : Slice(UInt8) | Nil)
#