Module Tezt_tezos.Tezindex

Tezindex process wrapper for Tezt tests.

type t

A running tezindex instance.

val run : ?runner:Tezt_wrapper.Runner.t -> ?path:string -> ?name:string -> node:Node.t -> ?rpc_port:int -> ?watched_addresses:string list -> unit -> t

run ?runner ?path ?name ~node ?rpc_port () spawns a tezindex process connected to node. A fresh temporary directory is used for --base-dir and a fresh port for the RPC server unless rpc_port is provided.

val wait_for_ready : ?attempts:int -> t -> unit Lwt.t

wait_for_ready ?attempts t polls the /health endpoint until it responds (up to attempts times, default 30, with 1s delay).

val get_v1_rewards_split : t -> baker:string -> cycle:int -> Tezt_wrapper.JSON.t Lwt.t

get_v1_rewards_split t ~baker ~cycle queries the /v1/rewards/split/{baker}/{cycle} endpoint and returns the parsed JSON response.