An index store to map Tezos block hashes to L2 block hashes. It is composed of an index only. This store is used to remember which Tezos blocks have been processed by the Tx rollup node. When there is no inbox for a Tezos block, we associate to it the L2 block of its predecessor.

type value = {
  1. l2_block : L2block.hash option;
  2. level : int32;
  3. predecessor : Tezos_crypto.Block_hash.t;
}
include INDEXABLE_STORE with type key := Tezos_crypto.Block_hash.t and type value := value
type t

The type of store build in indexes

val mem : t -> Tezos_crypto.Block_hash.t -> bool Lwt.t

Returns true if the key has a value associated in the store.

val find : t -> Tezos_crypto.Block_hash.t -> value option Lwt.t

Returns the value associated to a key in the store, or None otherwise.

val add : ?flush:bool -> t -> Tezos_crypto.Block_hash.t -> value -> unit Lwt.t

Add an association from a key to a value in the store. If flush (default to true) is set, the index is written on disk right away.