Module Store.Slots

A store of slots, indexed by slot id.

type t
val add_slot : t -> slot_size:int -> bytes -> Tezos_dal_node_services.Types.slot_id -> (unit, [> Errors.other ]) Stdlib.result Lwt.t

add_slot store ~slot_size slot_content slot_id adds a mapping from the given slot id to the given slot content.

val find_slot : t -> slot_size:int -> Tezos_dal_node_services.Types.slot_id -> (bytes, [> Errors.other | Errors.not_found ]) Stdlib.result Lwt.t

find_slot store ~slot_size slot_id returns the slot associated to some slot id or Error `Not_found if no slot is associated.

val remove_slot : t -> slot_size:int -> Tezos_dal_node_services.Types.slot_id -> unit Tezos_base.TzPervasives.tzresult Lwt.t