diff options
Diffstat (limited to 'lib/kernel/BranchManager.ml')
| -rw-r--r-- | lib/kernel/BranchManager.ml | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/kernel/BranchManager.ml b/lib/kernel/BranchManager.ml index c1e4aef..016f75a 100644 --- a/lib/kernel/BranchManager.ml +++ b/lib/kernel/BranchManager.ml @@ -14,8 +14,11 @@ module Make (S : Abstract.Storage.STORAGE) = struct let root_for tx label = let open Utilities.Result in let* label = S.get tx (S.Label label) in - let label = Option.map Concepts.Hash.hash_of_blob label in - Ok label + let data = Option.map (fun blob -> Concepts.Blob.bytes_of_blob blob + |> Bytes.to_string + |> Concepts.Hash.of_raw_string) + label in + Ok data let persist_root tx label addr = let data = Concepts.Hash.blob_of_hash addr in |
