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.
Constant Summary
Constants included from Util
Util::HASH_SIZE, Util::MAX_DEPTH
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, #decode_hash, #hex_string?, #node_hash?, #normalize_hash
Constructor Details
This class inherits a constructor from Merkle::AbstractTree