Synchronisation_heuristic.Core
This module is Lwt
agnostic and implements all the logic behind the synchronisation heuristic.
val create : threshold:int -> latency:int -> t
create ~threshold ~latency ()
initializes the heuristic with these two parameters
val update :
t ->
(Mavryk_base.Time.Protocol.t * Mavryk_base.P2p_peer.Id.t) ->
unit
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.