Tezt_mavryk.Daemonmodule type PARAMETERS = sig ... endParameters of the Daemon.Make functor.
module Level : sig ... endmodule Make (X : PARAMETERS) : sig ... endFunctor for the common parts of all Mavryk daemons: node, baker, endorser and accuser. Handles event handling in particular.
Transform an event filter into one that waits for several events.
Usage: n_events n filter
n represents the number of events that the resulting filter must wait for.
filter is the initial filter that must be transformed. It is expressed as a function that takes a serialized input (for example a JSON.t) and returns some deserialized output (an event) if no error occured during the decoding and input matched some acceptance criteria.
The function evaluates into a new filter, i.e. a new function that takes a serialized input and returns None until n calls where the given input passes the initial filter are performed.
On the nth successful call, the resulting filter will return some list of the n successuful outputs of filter. The order of the given inputs is preserved in the list of outputs.
The behavior of the resulting filter is unspecified after the list has been returned.