package tezos-shell

  1. Overview
  2. Docs

Core

This module is Lwt agnostic and implements all the logic behind the synchronisation heuristic.

type t

Internal state of the bootstrap_heuristic

val create : threshold:int -> latency:int -> t

create ~threshold ~latency () initializes the heuristic with these two parameters

update t (timestamp, peer) updates t according to the heuristic above. The timestamp should come from a valid block, and the peer should be the one who sent the block.

val get_status : t -> status

get_status t is the current status according of the bootstrap heuristic described above.

OCaml

Innovation. Community. Security.