2016-09-08 21:13:10 +04:00
|
|
|
(**************************************************************************)
|
|
|
|
(* *)
|
|
|
|
(* Copyright (c) 2014 - 2016. *)
|
|
|
|
(* Dynamic Ledger Solutions, Inc. <contact@tezos.com> *)
|
|
|
|
(* *)
|
|
|
|
(* All rights reserved. No warranty, explicit or implicit, provided. *)
|
|
|
|
(* *)
|
|
|
|
(**************************************************************************)
|
|
|
|
|
|
|
|
type worker
|
|
|
|
|
2017-04-10 23:14:17 +04:00
|
|
|
val create_worker: ?max_ttl:int -> State.t -> Distributed_db.t -> worker
|
2016-09-08 21:13:10 +04:00
|
|
|
val shutdown: worker -> unit Lwt.t
|
|
|
|
|
2017-02-24 20:17:53 +04:00
|
|
|
val notify_block: worker -> Block_hash.t -> State.Block_header.t -> unit Lwt.t
|
2016-09-08 21:13:10 +04:00
|
|
|
|
|
|
|
type t
|
|
|
|
|
2017-02-28 21:46:40 +04:00
|
|
|
type error +=
|
|
|
|
| Non_increasing_timestamp
|
|
|
|
| Non_increasing_fitness
|
|
|
|
|
2016-09-08 21:13:10 +04:00
|
|
|
val activate: worker -> State.Net.t -> t Lwt.t
|
2017-03-31 15:04:05 +04:00
|
|
|
val get: worker -> Net_id.t -> t tzresult Lwt.t
|
|
|
|
val get_exn: worker -> Net_id.t -> t Lwt.t
|
2016-09-08 21:13:10 +04:00
|
|
|
val deactivate: t -> unit Lwt.t
|
|
|
|
|
2017-02-24 20:17:53 +04:00
|
|
|
val net_state: t -> State.Net.t
|
|
|
|
val net_db: t -> Distributed_db.net
|
|
|
|
|
2016-09-08 21:13:10 +04:00
|
|
|
val fetch_block:
|
|
|
|
t -> Block_hash.t -> State.Valid_block.t tzresult Lwt.t
|
2017-02-24 20:17:53 +04:00
|
|
|
|
|
|
|
val inject_block:
|
2017-03-30 15:16:21 +04:00
|
|
|
worker -> ?force:bool ->
|
|
|
|
MBytes.t -> Operation_hash.t list list ->
|
2017-02-24 20:17:53 +04:00
|
|
|
(Block_hash.t * State.Valid_block.t tzresult Lwt.t) tzresult Lwt.t
|
|
|
|
|
2016-09-08 21:13:10 +04:00
|
|
|
val prevalidator: t -> Prevalidator.t
|
2017-02-24 20:17:53 +04:00
|
|
|
val test_validator: t -> (t * Distributed_db.net) option
|
|
|
|
|
2017-02-28 03:48:22 +04:00
|
|
|
val watcher: t -> State.Valid_block.t Lwt_stream.t * Watcher.stopper
|
|
|
|
val new_head_watcher: t -> State.Valid_block.t Lwt_stream.t * Watcher.stopper
|
|
|
|
val global_watcher: worker -> State.Valid_block.t Lwt_stream.t * Watcher.stopper
|
|
|
|
|
|
|
|
val bootstrapped: t -> unit Lwt.t
|