2017-11-11 06:34:12 +04:00
|
|
|
(**************************************************************************)
|
|
|
|
(* *)
|
2018-02-06 00:17:03 +04:00
|
|
|
(* Copyright (c) 2014 - 2018. *)
|
2017-11-11 06:34:12 +04:00
|
|
|
(* 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) ->
|
2018-02-16 04:26:24 +04:00
|
|
|
Distributed_db.chain_db ->
|
2017-11-11 06:34:12 +04:00
|
|
|
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 ->
|
2018-03-15 18:26:52 +04:00
|
|
|
Protocol_hash.t -> Registered_protocol.t tzresult Lwt.t
|
2017-11-11 06:34:12 +04:00
|
|
|
|
|
|
|
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
|