From 465f3378daea5a6f0d44f3729c3551a9cda78ed9 Mon Sep 17 00:00:00 2001 From: Estevan Castilho Date: Thu, 20 Aug 2026 00:00:36 +0000 Subject: BranchManager sketch --- lib/kernel/BranchIndex.ml | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100644 lib/kernel/BranchIndex.ml (limited to 'lib/kernel/BranchIndex.ml') diff --git a/lib/kernel/BranchIndex.ml b/lib/kernel/BranchIndex.ml deleted file mode 100644 index 00bd44d..0000000 --- a/lib/kernel/BranchIndex.ml +++ /dev/null @@ -1,29 +0,0 @@ -type address = Concepts.Hash.hash -type root = address -type branch_name = string -type branch_state_root = address - -let default_branch_name = "master" - -module Branch_name = struct - type t = branch_name - - let encode name = Concepts.Codec.Bencode.(String name |> to_blob) - let compare left right = Concepts.Ordering.of_int (String.compare left right) - - let decode blob = - Concepts.Codec.Bencode.of_blob blob |> Utilities.Result.fmap Concepts.Codec.Bencode.as_string -end - -module Make (Store : Abstract.Storage.STORAGE) = struct - module Tree = Merkle.Make (Store) (Branch_name) - - type tree = Tree.node - - let empty = Tree.empty - let empty_under = Tree.empty_under - let hash_of = Tree.hash_of - let find = Tree.find - let find_branch = Tree.lookup - let put_branch = Tree.insert -end -- cgit v1.2.3