aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/SubstantialRelation.ml
diff options
context:
space:
mode:
authorMarcos Magueta <maguetamarcos@gmail.com>2026-10-12 11:47:14 -0300
committerMarcos Magueta <maguetamarcos@gmail.com>2026-10-12 11:47:14 -0300
commita3acc318ead5620ac20f70815b4dfb0810ccd2a4 (patch)
treee1bf3b6331c07005a83650da36499a931dfeb24d /lib/kernel/SubstantialRelation.ml
parentc66c3c82fda2f68e5aac62d16657d8a77e6d91ee (diff)
downloadRNT-a3acc318ead5620ac20f70815b4dfb0810ccd2a4.tar.gz
RNT-a3acc318ead5620ac20f70815b4dfb0810ccd2a4.zip
abstracting headers and merkle of list construction
Diffstat (limited to 'lib/kernel/SubstantialRelation.ml')
-rw-r--r--lib/kernel/SubstantialRelation.ml8
1 files changed, 1 insertions, 7 deletions
diff --git a/lib/kernel/SubstantialRelation.ml b/lib/kernel/SubstantialRelation.ml
index 09aec90..9cb57f0 100644
--- a/lib/kernel/SubstantialRelation.ml
+++ b/lib/kernel/SubstantialRelation.ml
@@ -144,14 +144,8 @@ module Make (S : Abstract.Storage.STORAGE) = struct
let store tx description tuples =
let open Utilities.Result in
let* schematics = store_schema tx description in
- let* _ = TupleSet.empty_under tx in
let* node =
- TupleSet.with_batch tx (fun () ->
- List.fold_left
- (fun node tuple ->
- let* node = node in
- TupleSet.insert tx (Concepts.Tuple.hash tuple) tuple node )
- (Ok TupleSet.empty) tuples )
+ TupleSet.of_list tx (List.map (fun tuple -> Concepts.Tuple.hash tuple, tuple) tuples)
in
let relation = {schematics; tuples= TupleSet.hash_of node} in
let* _ = SI.store_blob tx (encode relation) in