lib/sp_store/p_chip/soft_node_cache.rb
def unsafe_update(update_path, data_hash)
    update_path.each { |path_entry| check_entry path_entry }    
    check_update_path update_path
    
    @node_hashes[update_path.first] = data_hash
    visit_update_path update_path do |hot_entry, cold_entry, parent_entry|
      hot_node = @node_ids[hot_entry]
      cold_node = @node_ids[cold_entry]
      parent_node = @node_ids[parent_entry]
      @node_hashes[parent_entry] = if Helpers.left_child?(hot_node)
        SpStore::Crypto.hash_for_tree_node parent_node,
            @node_hashes[hot_entry], @node_hashes[cold_entry]
      else
        SpStore::Crypto.hash_for_tree_node parent_node,
            @node_hashes[cold_entry], @node_hashes[hot_entry]
      end
    end
  end
# :nodoc: actual implementation of P-chip update
:nodoc: actual implementation of P-chip update
: nodoc : actual implementation of P - chip update
def unsafe_update(update_path, data_hash)
    update_path.each { |path_entry| check_entry path_entry }    
    check_update_path update_path
    @node_hashes[update_path.first] = data_hash
    visit_update_path update_path do |hot_entry, cold_entry, parent_entry|
      hot_node = @node_ids[hot_entry]
      cold_node = @node_ids[cold_entry]
      parent_node = @node_ids[parent_entry]
      @node_hashes[parent_entry] = if Helpers.left_child?(hot_node)
        SpStore::Crypto.hash_for_tree_node parent_node,
            @node_hashes[hot_entry], @node_hashes[cold_entry]
      else
        SpStore::Crypto.hash_for_tree_node parent_node,
            @node_hashes[cold_entry], @node_hashes[hot_entry]
      end
    end
  end
def unsafe_update ( update_path , data_hash ) update_path . each { | path_entry | check_entry path_entry } check_update_path update_path @node_hashes [ update_path . first ] = data_hash visit_update_path update_path do | hot_entry , cold_entry , parent_entry | hot_node = @node_ids [ hot_entry ] cold_node = @node_ids [ cold_entry ] parent_node = @node_ids [ parent_entry ] @node_hashes [ parent_entry ] = if Helpers . left_child? ( hot_node ) SpStore :: Crypto . hash_for_tree_node parent_node , @node_hashes [ hot_entry ] , @node_hashes [ cold_entry ] else SpStore :: Crypto . hash_for_tree_node parent_node , @node_hashes [ cold_entry ] , @node_hashes [ hot_entry ] end end end
:nodoc: actual implementation of P-chip update
: nodoc : actual implementation of P - chip update
update_path
data_hash