From be6ebb5ffa3fc9a1def43407eb7ba1d6f37f6284 Mon Sep 17 00:00:00 2001 From: Age Manning Date: Wed, 3 Apr 2019 17:16:32 +1100 Subject: [PATCH] Add custom inactivity timeout to gossipsub --- beacon_node/eth2-libp2p/src/config.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/beacon_node/eth2-libp2p/src/config.rs b/beacon_node/eth2-libp2p/src/config.rs index 0757f1cbb..1a3f3ad3d 100644 --- a/beacon_node/eth2-libp2p/src/config.rs +++ b/beacon_node/eth2-libp2p/src/config.rs @@ -1,8 +1,8 @@ use clap::ArgMatches; use libp2p::gossipsub::{GossipsubConfig, GossipsubConfigBuilder}; use serde_derive::{Deserialize, Serialize}; +use std::time::Duration; use types::multiaddr::{Error as MultiaddrError, Multiaddr}; -//use std::time::Duration; /// The beacon node topic string to subscribe to. pub const BEACON_PUBSUB_TOPIC: &str = "beacon_node"; @@ -35,7 +35,7 @@ impl Default for Config { listen_addresses: vec!["/ip4/127.0.0.1/tcp/9000".to_string()], gs_config: GossipsubConfigBuilder::new() .max_gossip_size(4_000_000) - // .inactivity_timeout(Duration::from_secs(90)) + .inactivity_timeout(Duration::from_secs(90)) .build(), identify_config: IdentifyConfig::default(), boot_nodes: vec![],