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-02-24 20:17:53 +04:00
|
|
|
val create_worker: 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
|
|
|
|
|
|
|
|
val activate: worker -> State.Net.t -> t Lwt.t
|
2017-02-24 20:17:53 +04:00
|
|
|
val get: worker -> State.Net_id.t -> t tzresult Lwt.t
|
|
|
|
val get_exn: worker -> State.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:
|
|
|
|
worker -> ?force:bool -> MBytes.t ->
|
|
|
|
(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
|
|
|
|
|
|
|
|
val watcher: worker -> State.Valid_block.t Lwt_stream.t * Watcher.stopper
|