aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/Storage.ml
diff options
context:
space:
mode:
authorMarcos Magueta <maguetamarcos@gmail.com>2026-09-23 03:23:40 -0300
committerMarcos Magueta <maguetamarcos@gmail.com>2026-09-23 03:23:40 -0300
commitb4422c99e10a8daee452b22aea84cb1f68ae54bc (patch)
tree1f2ac50f4c536b8da83fca654cb3a6dee86a9975 /lib/kernel/Storage.ml
parentf88aeff9f7a673e945484a31fbcaed647bb3d2fa (diff)
downloadRNT-b4422c99e10a8daee452b22aea84cb1f68ae54bc.tar.gz
RNT-b4422c99e10a8daee452b22aea84cb1f68ae54bc.zip
refactor ephemeral and subs relations
Diffstat (limited to 'lib/kernel/Storage.ml')
-rw-r--r--lib/kernel/Storage.ml7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/kernel/Storage.ml b/lib/kernel/Storage.ml
index dd06783..f0c4800 100644
--- a/lib/kernel/Storage.ml
+++ b/lib/kernel/Storage.ml
@@ -36,11 +36,14 @@ module Make (S : Abstract.Storage.STORAGE) = struct
let _ = S.abort tx in
Error condition
- let with_transaction connection body =
+ let within start connection body =
let open Utilities.Result in
- let* tx = S.start connection in
+ let* tx = start connection in
body tx |> finish tx
+ let with_transaction connection = within S.start connection
+ let with_read connection = within S.start_read connection
+
let store_blob tx blob =
let open Utilities.Result in
let address = Concepts.Hash.hash_of_blob blob in