aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/Merkle.ml
diff options
context:
space:
mode:
authorEstevan Castilho <tevo@riajuu.net>2026-08-13 00:26:10 +0000
committerEstevan Castilho <tevo@riajuu.net>2026-08-23 03:06:55 +0000
commitf885a8f7dd85d79c5c8aa93265f5dea781b345a9 (patch)
tree2fc4c72e0436a278dc01d0387f38d1e0080d8284 /lib/kernel/Merkle.ml
parenta727eb4351df972ff2e34fa111aeb435e70cdbd4 (diff)
downloadRNT-f885a8f7dd85d79c5c8aa93265f5dea781b345a9.tar.gz
RNT-f885a8f7dd85d79c5c8aa93265f5dea781b345a9.zip
Avoid exporting `persist`
Diffstat (limited to 'lib/kernel/Merkle.ml')
-rw-r--r--lib/kernel/Merkle.ml5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/kernel/Merkle.ml b/lib/kernel/Merkle.ml
index 5bd427f..6f342cd 100644
--- a/lib/kernel/Merkle.ml
+++ b/lib/kernel/Merkle.ml
@@ -19,11 +19,10 @@ module type TREE = functor (S : Abstract.Storage.STORAGE) (K : KEY) -> sig
val find : S.transaction -> address -> (node option, Concepts.Condition.condition) result
val empty : node
+ val empty_under : S.transaction -> (address, Concepts.Condition.condition) result
val hash_of : node -> address
- val persist : S.transaction -> node -> (address, Concepts.Condition.condition) result
-
val insert : S.transaction -> K.t -> address -> node -> (node, Concepts.Condition.condition) result
val remove : S.transaction -> K.t -> node -> (node, Concepts.Condition.condition) result
val lookup : S.transaction -> K.t -> node -> (address option, Concepts.Condition.condition) result
@@ -150,6 +149,8 @@ module Make : TREE = functor (S : Abstract.Storage.STORAGE) (K : KEY) -> struct
let* () = S.put tx addr data in
Ok addr
+ let empty_under tx = persist tx empty
+
type op = Update of address * node | Split of address * K.t * address
let emplace i v ft =