Commit 90d8d652 authored by Philippe B.'s avatar Philippe B. 🏂 Committed by Romain

P2p: remove deadcode (unused param in conn_meta constructor)

parent eb1d90ae
Pipeline #107481671 passed with stages
in 29 minutes and 53 seconds
......@@ -47,7 +47,7 @@ type 'peer_meta peer_meta_config = {
(** Metadata for a connection. *)
type 'conn_meta conn_meta_config = {
conn_meta_encoding : 'conn_meta Data_encoding.t;
conn_meta_value : P2p_peer.Id.t -> 'conn_meta; (** Constructor *)
conn_meta_value : unit -> 'conn_meta; (** Constructor *)
private_node : 'conn_meta -> bool;
(** Returns true if peer at the other end of the connection is in private
mode *)
......
......@@ -324,9 +324,7 @@ let authenticate ~canceler ~proof_of_work_target ~incoming fd
Crypto_box.generate_nonces ~incoming ~sent_msg ~recv_msg
in
let cryptobox_data = {Crypto.channel_key; local_nonce; remote_nonce} in
let local_metadata =
metadata_config.P2p_params.conn_meta_value remote_peer_id
in
let local_metadata = metadata_config.P2p_params.conn_meta_value () in
Metadata.write ~canceler metadata_config fd cryptobox_data local_metadata
>>=? fun () ->
Metadata.read ~canceler metadata_config fd cryptobox_data
......
......@@ -58,7 +58,7 @@ let peer_meta_config : metadata P2p_params.peer_meta_config =
let conn_meta_config : metadata P2p_params.conn_meta_config =
{
conn_meta_encoding = Data_encoding.empty;
conn_meta_value = (fun _ -> ());
conn_meta_value = (fun () -> ());
private_node = (fun _ -> false);
}
......
......@@ -55,7 +55,7 @@ type metadata = unit
let conn_meta_config : metadata P2p_params.conn_meta_config =
{
conn_meta_encoding = Data_encoding.empty;
conn_meta_value = (fun _ -> ());
conn_meta_value = (fun () -> ());
private_node = (fun _ -> false);
}
......
......@@ -108,7 +108,7 @@ let connection_metadata_cfg cfg : _ P2p_params.conn_meta_config =
{
conn_meta_encoding = Connection_metadata.encoding;
private_node = (fun {private_node; _} -> private_node);
conn_meta_value = (fun _ -> cfg);
conn_meta_value = (fun () -> cfg);
}
let init_connection_metadata opt =
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment