From 836e1ab528379ac5e0e9151cf369628dcf1034a3 Mon Sep 17 00:00:00 2001 From: Marcos Magueta Date: Wed, 2 Sep 2026 23:42:52 -0300 Subject: fix initialization persistence --- lib/kernel/Branch.ml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'lib/kernel/Branch.ml') diff --git a/lib/kernel/Branch.ml b/lib/kernel/Branch.ml index 31442f6..f44ab6e 100644 --- a/lib/kernel/Branch.ml +++ b/lib/kernel/Branch.ml @@ -73,6 +73,9 @@ module Make (S : Abstract.Storage.STORAGE) = struct let make conn = let open Utilities.Result in - let* empty = SI.with_transaction conn MultigroupM.empty_under in - Ok (new branch conn { multigroups = empty; previous = None } |> Protocols.Handle.make) + SI.with_transaction conn (fun tx -> + let* empty = MultigroupM.empty_under tx in + let branch = { multigroups = empty; previous = None } in + let* _ = SI.store_blob tx (Representation.to_blob branch) in + Ok (new branch conn branch |> Protocols.Handle.make)) end -- cgit v1.2.3