package octez-shell-libs

  1. Overview
  2. Docs
On This Page
  1. Core
Legend:
Library
Module
Module type
Parameter
Class
Class type

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.