ligo/src/node/shell/validator.mli

47 lines
1.7 KiB
OCaml
Raw Normal View History

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
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
val notify_block: worker -> Block_hash.t -> Block_header.t -> unit Lwt.t
2016-09-08 21:13:10 +04:00
type t
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
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
val inject_block:
worker -> ?force:bool ->
MBytes.t -> Operation_hash.t list list ->
(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
val test_validator: t -> (t * Distributed_db.net) option
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