Skip to content

Commit

Permalink
Fix bug in Mask's copy
Browse files Browse the repository at this point in the history
  • Loading branch information
georgeee committed Nov 30, 2023
1 parent 8914406 commit 6562412
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/lib/merkle_mask/masking_merkle_tree.ml
Original file line number Diff line number Diff line change
Expand Up @@ -624,16 +624,18 @@ module Make (Inputs : Inputs_intf.S) = struct

(* copy tables in t; use same parent *)
let copy t =
let detached_parent_signal = Async.Ivar.create () in
{ uuid = Uuid_unix.create ()
; parent = Ok (get_parent t)
; detached_parent_signal = Async.Ivar.create ()
; detached_parent_signal
; current_location = t.current_location
; depth = t.depth
; maps = maps_copy t.maps
; accumulated =
Option.map t.accumulated ~f:(fun acc ->
{ acc with
next = maps_copy acc.next
{ base = acc.base
; detached_next_signal = detached_parent_signal
; next = maps_copy acc.next
; current = maps_copy acc.current
} )
}
Expand Down

0 comments on commit 6562412

Please sign in to comment.