P2p: export function 'P2p_pool.score'

This commit is contained in:
OCamlPro-Iguernlala 2018-07-24 15:54:22 +02:00 committed by Grégoire Henry
parent 3a3d0848ad
commit a70ae26706
No known key found for this signature in database
GPG Key ID: 827A020B224844F1
2 changed files with 6 additions and 2 deletions

View File

@ -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 =

View File

@ -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