diff --git a/src/lib_p2p/p2p_pool.ml b/src/lib_p2p/p2p_pool.ml index 0ca8e1e4a..286fd84dc 100644 --- a/src/lib_p2p/p2p_pool.ml +++ b/src/lib_p2p/p2p_pool.ml @@ -633,8 +633,6 @@ module Connection = struct let stat { conn } = P2p_socket.stat conn - let score { peer_meta_config = { score }} meta = score meta - let info { conn } = P2p_socket.info conn @@ -682,6 +680,8 @@ let pool_stat { io_sched } = let config { config } = config +let score { peer_meta_config = { score }} meta = score meta + (***************************************************************************) let fail_unless_disconnected_point point_info = diff --git a/src/lib_p2p/p2p_pool.mli b/src/lib_p2p/p2p_pool.mli index b930d743e..b52072440 100644 --- a/src/lib_p2p/p2p_pool.mli +++ b/src/lib_p2p/p2p_pool.mli @@ -184,6 +184,10 @@ val send_swap_request: ('msg, 'peer_meta,'conn_meta) pool -> unit <> pj), suggest swap with pi for the peer pj. This behaviour is disabled in private mode *) +val score: ('msg, 'peer_meta,'conn_meta) pool -> 'peer_meta -> float +(** [score pool peer_meta] returns the score of a peer in the pool + whose peer_meta is provided *) + (** {2 Pool events} *) module Pool_event : sig