diff options
| author | Marcos Magueta <maguetamarcos@gmail.com> | 2026-08-01 14:22:05 -0300 |
|---|---|---|
| committer | Estevan Castilho <tevo@riajuu.net> | 2026-08-23 03:06:51 +0000 |
| commit | ab360c794849300792b2dc5c9ff6354621040e2f (patch) | |
| tree | 03c0cec59ae2bfd20ef5af00e6a01bb2fe5dab2d /lib/kernel/BranchIndex.mli | |
| parent | b7a09b8c8913b26eb22b98aa77a324a1c23736e2 (diff) | |
| download | RNT-ab360c794849300792b2dc5c9ff6354621040e2f.tar.gz RNT-ab360c794849300792b2dc5c9ff6354621040e2f.zip | |
Initialization with Branch State and Index
Diffstat (limited to 'lib/kernel/BranchIndex.mli')
| -rw-r--r-- | lib/kernel/BranchIndex.mli | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/lib/kernel/BranchIndex.mli b/lib/kernel/BranchIndex.mli new file mode 100644 index 0000000..5a867bf --- /dev/null +++ b/lib/kernel/BranchIndex.mli @@ -0,0 +1,28 @@ +type address = Concepts.Hash.hash +type root = address +type branch_name = string +type branch_state_root = address + +val default_branch_name : branch_name + +module Make (Store : Abstract.Storage.STORAGE) : sig + type tree + + val empty : tree + val hash_of : tree -> root + val persist : Store.transaction -> tree -> (root, Concepts.Condition.condition) result + val find : Store.transaction -> root -> (tree option, Concepts.Condition.condition) result + + val find_branch : + Store.transaction -> + branch_name -> + tree -> + (branch_state_root option, Concepts.Condition.condition) result + + val put_branch : + Store.transaction -> + branch_name -> + branch_state_root -> + tree -> + (tree, Concepts.Condition.condition) result +end |
