From 71dca8af366918153350698302f073835ecc1a2d Mon Sep 17 00:00:00 2001 From: Age Manning Date: Thu, 21 Mar 2019 13:28:34 +1100 Subject: [PATCH] Correct user agent string --- beacon_node/eth2-libp2p/src/config.rs | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/beacon_node/eth2-libp2p/src/config.rs b/beacon_node/eth2-libp2p/src/config.rs index a86045b78..2b4972237 100644 --- a/beacon_node/eth2-libp2p/src/config.rs +++ b/beacon_node/eth2-libp2p/src/config.rs @@ -30,7 +30,7 @@ impl Default for Config { .expect("is a correct multi-address")], listen_port: 9000, gs_config: GossipsubConfigBuilder::new().build(), - identify_config: IdentifyConfig::new(&version::version()), + identify_config: IdentifyConfig::default(), boot_nodes: Vec::new(), client_version: version::version(), topics: vec![String::from("beacon_chain")], @@ -60,16 +60,7 @@ impl Default for IdentifyConfig { fn default() -> Self { Self { version: "/eth/serenity/1.0".to_string(), - user_agent: "Lighthouse".to_string(), + user_agent: version::version(), } } } - -impl IdentifyConfig { - /// Adds the version to the user agent. - pub fn new(version: &String) -> Self { - let mut config = IdentifyConfig::default(); - config.user_agent += version; - config - } -}