Update CLI defaults and book (#999)

This commit is contained in:
Age Manning
2020-04-14 15:29:29 +10:00
committed by GitHub
parent bf361e5ca3
commit db7847c34a
6 changed files with 62 additions and 11 deletions

View File

@@ -119,15 +119,16 @@ impl Default for Config {
.ping_interval(Duration::from_secs(300))
.build();
// NOTE: Some of these get overridden by the corresponding CLI default values.
Config {
network_dir,
listen_address: "127.0.0.1".parse().expect("valid ip address"),
listen_address: "0.0.0.0".parse().expect("valid ip address"),
libp2p_port: 9000,
discovery_port: 9000,
enr_address: None,
enr_udp_port: None,
enr_tcp_port: None,
max_peers: 10,
max_peers: 50,
secret_key_hex: None,
gs_config,
discv5_config,

View File

@@ -80,6 +80,7 @@ impl<TSpec: EthSpec> Service<TSpec> {
));
info!(log, "Libp2p Service"; "peer_id" => format!("{:?}", enr.peer_id()));
debug!(log, "Attempting to open listening ports"; "address" => format!("{}", config.listen_address), "tcp_port" => config.libp2p_port, "udp_port" => config.discovery_port);
let mut swarm = {
// Set up the transport - tcp/ws with noise/secio and mplex/yamux