2017-11-11 06:34:12 +04:00
|
|
|
(**************************************************************************)
|
|
|
|
(* *)
|
|
|
|
(* Copyright (c) 2014 - 2017. *)
|
|
|
|
(* Dynamic Ledger Solutions, Inc. <contact@tezos.com> *)
|
|
|
|
(* *)
|
|
|
|
(* All rights reserved. No warranty, explicit or implicit, provided. *)
|
|
|
|
(* *)
|
|
|
|
(**************************************************************************)
|
|
|
|
|
|
|
|
type t
|
|
|
|
|
2018-01-26 16:10:20 +04:00
|
|
|
type limits = {
|
|
|
|
protocol_timeout: float ;
|
|
|
|
worker_limits : Worker_types.limits ;
|
|
|
|
}
|
|
|
|
|
|
|
|
type error += Closed of unit
|
2017-11-11 06:34:12 +04:00
|
|
|
|
2017-11-13 17:25:02 +04:00
|
|
|
val create:
|
2018-01-26 16:10:20 +04:00
|
|
|
limits -> Distributed_db.t -> t Lwt.t
|
2017-11-11 06:34:12 +04:00
|
|
|
|
|
|
|
val validate:
|
|
|
|
t ->
|
2017-11-27 09:13:12 +04:00
|
|
|
?canceler:Lwt_canceler.t ->
|
2018-01-24 15:48:25 +04:00
|
|
|
?peer:P2p_peer.Id.t ->
|
2017-11-11 06:34:12 +04:00
|
|
|
?notify_new_block:(State.Block.t -> unit) ->
|
|
|
|
Distributed_db.net_db ->
|
|
|
|
Block_hash.t -> Block_header.t -> Operation.t list list ->
|
|
|
|
State.Block.t tzresult Lwt.t
|
|
|
|
|
|
|
|
val fetch_and_compile_protocol:
|
|
|
|
t ->
|
2018-01-24 15:48:25 +04:00
|
|
|
?peer:P2p_peer.Id.t ->
|
2017-11-11 06:34:12 +04:00
|
|
|
?timeout:float ->
|
|
|
|
Protocol_hash.t -> State.Registred_protocol.t tzresult Lwt.t
|
|
|
|
|
|
|
|
val shutdown: t -> unit Lwt.t
|
2018-01-26 16:10:20 +04:00
|
|
|
|
|
|
|
val running_worker: unit -> t
|
|
|
|
val status: t -> Worker_types.worker_status
|
|
|
|
|
|
|
|
val pending_requests : t -> (Time.t * Block_validator_worker_state.Request.view) list
|
|
|
|
val current_request : t -> (Time.t * Time.t * Block_validator_worker_state.Request.view) option
|
|
|
|
val last_events : t -> (Lwt_log_core.level * Block_validator_worker_state.Event.t list) list
|