ligo/src/node/shell/validator.mli

38 lines
1.4 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: 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 -> 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
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
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 ->
(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: worker -> State.Valid_block.t Lwt_stream.t * Watcher.stopper