diff --git a/config/management/genesis/src/ol_node_files.rs b/config/management/genesis/src/ol_node_files.rs index b588c06083..591834f23d 100644 --- a/config/management/genesis/src/ol_node_files.rs +++ b/config/management/genesis/src/ol_node_files.rs @@ -368,7 +368,8 @@ fn make_validator_cfg(output_dir: PathBuf, namespace: &str, seed_addresses: Opti vfn_net.listen_address = format!("/ip4/0.0.0.0/tcp/{}", DEFAULT_VFN_PORT).parse()?; let mut pub_net = NetworkConfig::network_with_id(NetworkId::Public); - pub_net.listen_address = format!("/ip4/0.0.0.0/tcp/{}", DEFAULT_PUB_PORT).parse()?; + + pub_net.listen_address = format!("/ip4/127.0.0.1/tcp/{}", DEFAULT_PUB_PORT).parse()?; // Don't fullnode sync requests // This ID is how the Validator node identifies themselves on their private VFN network. // same ID as being used in the validator network. @@ -376,9 +377,10 @@ fn make_validator_cfg(output_dir: PathBuf, namespace: &str, seed_addresses: Opti pub_net.identity = network_id; if let Some(s) = seed_addresses { - vfn_net.seed_addrs = s.clone(); pub_net.seed_addrs = s; } + + // pub_net.discovery_method = DiscoveryMethod::Onchain; c.full_node_networks = vec![vfn_net.to_owned(), pub_net.to_owned()]; diff --git a/ol/cli/src/commands/init_cmd.rs b/ol/cli/src/commands/init_cmd.rs index bc54804421..155e3acc99 100644 --- a/ol/cli/src/commands/init_cmd.rs +++ b/ol/cli/src/commands/init_cmd.rs @@ -202,8 +202,9 @@ impl Runnable for InitCmd { let namespace = app_cfg.format_oper_namespace(); let output_dir = app_cfg.workspace.node_home.clone(); - let seeds = pick_seed_peer(&mut app_cfg, entry_args.swarm_path.clone()); - match ol_node_files::make_val_file(output_dir, seeds.ok(), None, &namespace) { + let seeds = if self.seed_peer { pick_seed_peer(&mut app_cfg, entry_args.swarm_path.clone()).ok() } else { None }; + + match ol_node_files::make_val_file(output_dir, seeds,None, &namespace) { Ok(_) => {} Err(e) => { println!("Could not create file, exiting. Message: {:?}", e);