Parameter Blockchain.2-Queue

type ev = Event.t

The type of events being stored.

type elem = Simulator.Clock.t * ev

The type of the elements stored in the event queue. It is a tuple with the timestamp and the event. The timestamp is the key over which elements will be ordered.

val get_event : unit -> elem

Returns the next event in the queue (throws exception if the queue is empty).

val add_event : ev -> unit

Add an event to the queue, maintaining the timestamp ordering.

  • parameter event

    the event to be added to the queue

val has_event : unit -> bool

Returns whether or not there are pending events in the queue.

val cancel_minting : int -> unit

Cancels a scheduled minting event issued by the minter.

  • parameter minter

    the id of the node that created the event

val clear : unit -> unit

Clear all data from the queue.