diff --git a/src/lib_storage/store.ml b/src/lib_storage/store.ml index 7b73d6337..5111f6862 100644 --- a/src/lib_storage/store.ml +++ b/src/lib_storage/store.ml @@ -176,6 +176,14 @@ module Block = struct end end + module Predecessors = + Store_helpers.Make_map + (Store_helpers.Make_substore + (Indexed_store.Store) + (struct let name = ["predecessors"] end)) + (Store_helpers.Integer_index) + (Store_helpers.Make_value(Block_hash)) + end diff --git a/src/lib_storage/store.mli b/src/lib_storage/store.mli index cf3be1fc9..c88a1d8b2 100644 --- a/src/lib_storage/store.mli +++ b/src/lib_storage/store.mli @@ -121,6 +121,16 @@ module Block : sig and type key = Block_hash.t and type value = invalid_block + (** + Block predecessors under + [/blocks//predecessors//]. + Used to compute block predecessors in [lib_node_shell/state.ml]. + *) + module Predecessors : MAP_STORE + with type t = store * Block_hash.t + and type key = int + and type value = Block_hash.t + end