diff options
| author | Marcos Magueta <maguetamarcos@gmail.com> | 2026-09-02 23:42:52 -0300 |
|---|---|---|
| committer | Marcos Magueta <maguetamarcos@gmail.com> | 2026-09-02 23:42:52 -0300 |
| commit | 836e1ab528379ac5e0e9151cf369628dcf1034a3 (patch) | |
| tree | bb8706705591451e8771489dcb2ae4767ce992fd /lib/kernel/Branch.ml | |
| parent | 1259773fac4d7c334351c61ab8cf71231c1af4ef (diff) | |
| download | RNT-836e1ab528379ac5e0e9151cf369628dcf1034a3.tar.gz RNT-836e1ab528379ac5e0e9151cf369628dcf1034a3.zip | |
fix initialization persistence
Diffstat (limited to 'lib/kernel/Branch.ml')
| -rw-r--r-- | lib/kernel/Branch.ml | 7 |
1 files changed, 5 insertions, 2 deletions
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 |
