package tezos-p2p

  1. Overview
  2. Docs

This module defines constructor for the private and default P2p_answerer.t. Both pass messages `Message msg` to the upper-layer. The private answerer ignore all other messages.

type ('msg, 'peer, 'conn) config = {
  1. swap_linger : Tezos_base.Time.System.Span.t;
    (*

    Peer swapping does not occur more than once during a timespan of swap_linger.

    *)
  2. pool : ('msg, 'peer, 'conn) P2p_pool.t;
  3. log : Tezos_base.P2p_connection.P2p_event.t -> unit;
  4. connect : Tezos_base.P2p_point.Id.t -> (('msg, 'peer, 'conn) P2p_conn.t, Tezos_error_monad.TzCore.error list) Stdlib.result Lwt.t;
  5. mutable latest_accepted_swap : Tezos_base.Time.System.t;
  6. mutable latest_successful_swap : Tezos_base.Time.System.t;
}

The config type contains "global" values and configuration option used by the default answerer, known when setting up the connection handler in P2p

val create_default : ('msg, 'peer, 'conn) config -> 'msg P2p_answerer.t
val create_private : unit -> 'msg P2p_answerer.t
OCaml

Innovation. Community. Security.