lib/sp_store/merkle/hash_tree_helper.rb
def full_tree_leaf_count(min_capacity)
    # NOTE: a tree has at least one internal node (the root), so we want at
    #       least two leaves
    count = 2
    count *= 2 while count < min_capacity
    count
  end
# Number of leaves in a hash tree with a set minimum capacity (leaf count).
#
# The method rounds up its argument to the nearest power of two.
Number of leaves in a hash tree with a set minimum capacity (leaf count).
The method rounds up its argument to the nearest power of two.
Number of leaves in a hash tree with a set minimum capacity ( leaf count ) . The method rounds up its argument to the nearest power of two .
def full_tree_leaf_count(min_capacity)
    count = 2
    count *= 2 while count < min_capacity
    count
  end
def full_tree_leaf_count ( min_capacity ) count = 2 count *= 2 while count < min_capacity count end
Number of leaves in a hash tree with a set minimum capacity (leaf count).
Number of leaves in a hash tree with a set minimum capacity ( leaf count ) .
# NOTE: a tree has at least one internal node (the root), so we want at #       least two leaves
min_capacity