Library
Module
Module type
Parameter
Class
Class type
include Tezos_injector_013_PtJakart.Injector_sigs.S
with type rollup_node_state := State.t
and type tag := tag
val init :
Tezos_client_013_PtJakart.Protocol_client_context.full ->
data_dir:string ->
State.t ->
signers:
(Tezos_protocol_013_PtJakart.Protocol.Alpha_context.public_key_hash
* Tezos_injector_013_PtJakart.Injector_sigs.injection_strategy
* tag list)
list ->
unit Tezos_base.TzPervasives.tzresult Lwt.t
Initializes the injector with the rollup node state, for a list of signers, and start the workers. Each signer has its own worker with a queue of operations to inject.
val add_pending_operation :
?source:Tezos_protocol_013_PtJakart.Protocol.Alpha_context.public_key_hash ->
'a Tezos_protocol_013_PtJakart.Protocol.Alpha_context.manager_operation ->
unit Tezos_base.TzPervasives.tzresult Lwt.t
Add an operation as pending injection in the injector. If the source is not provided, the operation is queued to the worker which handles the corresponding tag.
val new_tezos_head :
Tezos_client_013_PtJakart.Protocol_client_context.Alpha_block_services.block_info ->
Tezos_client_013_PtJakart.Protocol_client_context.Alpha_block_services.block_info
Tezos_injector_013_PtJakart.Common.reorg ->
unit Lwt.t
Notify the injector of a new Tezos head. The injector marks the operations appropriately (for instance reverted operations that are part of a reorganization are put back in the pending queue). When an operation is considered as confirmed, it disappears from the injector.
val inject :
?tags:tag list ->
?strategy:Tezos_injector_013_PtJakart.Injector_sigs.injection_strategy ->
unit ->
unit Lwt.t
Trigger an injection of the pending operations for all workers. If tags
is given, only the workers which have a tag in tags
inject their pending operations. If strategy
is given, only workers which have this strategy inject their pending operations.
val shutdown : unit -> unit Lwt.t
Shutdown the injectors, waiting for the ongoing request to be processed.