diff --git a/src/lib_base/p2p_point.ml b/src/lib_base/p2p_point.ml index 6bd562a7c..b7445ad5a 100644 --- a/src/lib_base/p2p_point.ml +++ b/src/lib_base/p2p_point.ml @@ -2,6 +2,7 @@ (* *) (* Open Source License *) (* Copyright (c) 2018 Dynamic Ledger Solutions, Inc. *) +(* Copyright (c) 2019 Nomadic Labs, *) (* *) (* Permission is hereby granted, free of charge, to any person obtaining a *) (* copy of this software and associated documentation files (the "Software"),*) @@ -42,6 +43,8 @@ module Id = struct let pp_opt ppf = function | None -> Format.pp_print_string ppf "none" | Some point -> pp ppf point + let pp_list ppf point_list = + Format.pp_print_list ~pp_sep:Format.pp_print_space pp ppf point_list let is_local (addr, _) = Ipaddr.V6.is_private addr let is_global (addr, _) = not @@ Ipaddr.V6.is_private addr diff --git a/src/lib_base/p2p_point.mli b/src/lib_base/p2p_point.mli index 2b186f717..63f475f28 100644 --- a/src/lib_base/p2p_point.mli +++ b/src/lib_base/p2p_point.mli @@ -32,6 +32,7 @@ module Id : sig val pp : Format.formatter -> t -> unit val pp_opt : Format.formatter -> t option -> unit + val pp_list : Format.formatter -> t list -> unit val of_string_exn : string -> t val of_string : string -> (t, string) result