Class: Merkle::AdaptiveTree
- Inherits:
-
AbstractTree
- Object
- AbstractTree
- Merkle::AdaptiveTree
- Defined in:
- lib/merkle/adaptive_tree.rb
Overview
The AdaptiveTree class implements an unbalanced binary tree structure for Merkle tree construction, optimized for scenarios where frequently used scripts should be placed at shallower depths. Unlike the standard Bitcoin Merkle tree which maintains a complete binary tree by duplicating odd elements, AdaptiveTree promotes odd nodes to higher levels, creating variable-depth paths.
Instance Attribute Summary
Attributes inherited from AbstractTree
Method Summary
Methods inherited from AbstractTree
#compute_root, from_elements, #generate_proof, #initialize
Methods included from Util
#bin_to_hex, #combine_sorted, #hex_string?, #hex_to_bin
Constructor Details
This class inherits a constructor from Merkle::AbstractTree