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-22 20:47:18 +04:00
|
|
|
type limits = {
|
|
|
|
new_head_request_timeout: float ;
|
|
|
|
block_header_timeout: float ;
|
|
|
|
block_operations_timeout: float ;
|
|
|
|
protocol_timeout: float ;
|
|
|
|
worker_limits: Worker_types.limits
|
|
|
|
}
|
|
|
|
|
2017-11-11 06:34:12 +04:00
|
|
|
val peer_id: t -> P2p.Peer_id.t
|
|
|
|
val bootstrapped: t -> bool
|
2017-11-14 02:27:19 +04:00
|
|
|
val current_head: t -> Block_header.t
|
2017-11-11 06:34:12 +04:00
|
|
|
|
|
|
|
val create:
|
|
|
|
?notify_new_block: (State.Block.t -> unit) ->
|
|
|
|
?notify_bootstrapped: (unit -> unit) ->
|
2018-01-22 20:47:18 +04:00
|
|
|
?notify_termination: (unit -> unit) ->
|
|
|
|
limits ->
|
2017-11-11 06:34:12 +04:00
|
|
|
Block_validator.t ->
|
|
|
|
Distributed_db.net_db -> P2p.Peer_id.t -> t Lwt.t
|
|
|
|
val shutdown: t -> unit Lwt.t
|
|
|
|
|
|
|
|
val notify_branch: t -> Block_locator.t -> unit
|
|
|
|
val notify_head: t -> Block_header.t -> unit
|
2018-01-22 20:47:18 +04:00
|
|
|
|
|
|
|
val running_workers: unit -> ((Net_id.t * P2p.Peer_id.t) * t) list
|
|
|
|
val status: t -> Worker_types.worker_status
|
|
|
|
|
|
|
|
val current_request : t -> (Time.t * Time.t * Peer_validator_worker_state.Request.view) option
|
|
|
|
val last_events : t -> (Lwt_log_core.level * Peer_validator_worker_state.Event.t list) list
|