lib/sp_store/mocks/soft_hash_tree.rb
def update_unchecked(leaf_id, new_value)
    start_node_id = leaf_node_id leaf_id
    @nodes[start_node_id] = new_value
    visit_path_to_root start_node_id do |node_id|
      @nodes[node_id] = correct_node_hash node_id unless leaf_node?(node_id)
    end
    self
  end
# Creates a hash tree where all the leaves have the same value.
#
# Args:
#   min_capacity:: the minimum number of leaf nodes in the tree
#   leaf_content:: the initial content of the tree leaves
Creates a hash tree where all the leaves have the same value.
Creates a hash tree where all the leaves have the same value .
def update_unchecked(leaf_id, new_value)
    start_node_id = leaf_node_id leaf_id
    @nodes[start_node_id] = new_value
    visit_path_to_root start_node_id do |node_id|
      @nodes[node_id] = correct_node_hash node_id unless leaf_node?(node_id)
    end
    self
  end
def update_unchecked ( leaf_id , new_value ) start_node_id = leaf_node_id leaf_id @nodes [ start_node_id ] = new_value visit_path_to_root start_node_id do | node_id | @nodes [ node_id ] = correct_node_hash node_id unless leaf_node? ( node_id ) end self end
Creates a hash tree where all the leaves have the same value.
Creates a hash tree where all the leaves have the same value .
leaf_id
new_value