Browse Source

removing the unnecessary old_P variable from optimized insert

avadapal 1 year ago
parent
commit
d90d1162f2
1 changed files with 4 additions and 4 deletions
  1. 4 4
      heap.cpp

+ 4 - 4
heap.cpp

@@ -66,14 +66,14 @@ and adds the the value into the heap while keeping the heap property intact
 void MinHeap::insert_optimized(MPCTIO tio, yield_t & yield, RegAS val) {
     auto HeapArray = oram.flat(tio, yield);
     num_items++;
-    typename Duoram<RegAS>::Path old_P(HeapArray, tio, yield, num_items);
-    const RegXS foundidx = old_P.binary_search(val);
+    typename Duoram<RegAS>::Path P(HeapArray, tio, yield, num_items);
+    const RegXS foundidx = P.binary_search(val);
     size_t childindex = num_items;
     // height is the number of nodes on the path from root to the leaf
-    uint64_t height = old_P.size();
+    uint64_t height = P.size();
     RegAS zero;
     HeapArray[childindex] = zero;
-    typename Duoram<RegAS>::Path P(HeapArray, tio, yield, num_items);
+    
     
     #ifdef HEAP_VERBOSE
     uint64_t val_reconstruction = mpc_reconstruct(tio, yield, val);