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. *)
|
|
|
|
(* *)
|
|
|
|
(**************************************************************************)
|
|
|
|
|
2017-09-29 20:43:13 +04:00
|
|
|
type t
|
2016-09-08 21:13:10 +04:00
|
|
|
|
2017-09-29 20:43:13 +04:00
|
|
|
val create: State.t -> Distributed_db.t -> t
|
2017-09-29 20:43:13 +04:00
|
|
|
val shutdown: t -> unit Lwt.t
|
2016-09-08 21:13:10 +04:00
|
|
|
|
2017-09-29 20:43:13 +04:00
|
|
|
val notify_block: t -> Block_hash.t -> Block_header.t -> unit Lwt.t
|
2016-09-08 21:13:10 +04:00
|
|
|
|
2017-09-29 20:43:13 +04:00
|
|
|
type net_validator
|
2016-09-08 21:13:10 +04:00
|
|
|
|
2017-02-28 21:46:40 +04:00
|
|
|
type error +=
|
2017-11-13 19:34:00 +04:00
|
|
|
| Non_increasing_timestamp
|
|
|
|
| Non_increasing_fitness
|
2017-02-28 21:46:40 +04:00
|
|
|
|
2017-09-29 20:43:13 +04:00
|
|
|
val activate: t -> ?max_child_ttl:int -> State.Net.t -> net_validator Lwt.t
|
2017-09-29 20:43:13 +04:00
|
|
|
val get: t -> Net_id.t -> net_validator tzresult Lwt.t
|
|
|
|
val get_exn: t -> Net_id.t -> net_validator Lwt.t
|
|
|
|
val deactivate: net_validator -> unit Lwt.t
|
2016-09-08 21:13:10 +04:00
|
|
|
|
2017-09-29 20:43:13 +04:00
|
|
|
val net_state: net_validator -> State.Net.t
|
|
|
|
val net_db: net_validator -> Distributed_db.net_db
|
2017-02-24 20:17:53 +04:00
|
|
|
|
2016-09-08 21:13:10 +04:00
|
|
|
val fetch_block:
|
2017-09-29 20:43:13 +04:00
|
|
|
net_validator -> Block_hash.t -> State.Block.t tzresult Lwt.t
|
2017-02-24 20:17:53 +04:00
|
|
|
|
|
|
|
val inject_block:
|
2017-09-29 20:43:13 +04:00
|
|
|
t -> ?force:bool ->
|
2017-04-19 23:46:10 +04:00
|
|
|
MBytes.t -> Distributed_db.operation list list ->
|
|
|
|
(Block_hash.t * State.Block.t tzresult Lwt.t) tzresult Lwt.t
|
2017-02-24 20:17:53 +04:00
|
|
|
|
2017-09-29 20:43:13 +04:00
|
|
|
val prevalidator: net_validator -> Prevalidator.t
|
|
|
|
val test_validator: net_validator -> (net_validator * Distributed_db.net_db) option
|
2017-02-24 20:17:53 +04:00
|
|
|
|
2017-09-29 20:43:13 +04:00
|
|
|
val watcher: net_validator -> State.Block.t Lwt_stream.t * Watcher.stopper
|
|
|
|
val new_head_watcher: net_validator -> State.Block.t Lwt_stream.t * Watcher.stopper
|
|
|
|
val global_watcher: t -> State.Block.t Lwt_stream.t * Watcher.stopper
|
2017-02-28 03:48:22 +04:00
|
|
|
|
2017-09-29 20:43:13 +04:00
|
|
|
val bootstrapped: net_validator -> unit Lwt.t
|