node: increase default amount of peers
This commit is contained in:
parent
45f01a7ff3
commit
4324acb0f7
1 changed files with 6 additions and 0 deletions
|
@ -181,8 +181,14 @@ impl NodeConfig {
|
|||
let mut default_config = GlobalConfig::for_chain(chain_type);
|
||||
default_config.update_paths(&Settings::get_base_path(sub_dir));
|
||||
let mut config = default_config.members.unwrap();
|
||||
|
||||
// Generate random p2p and api ports.
|
||||
Self::setup_default_ports(&mut config);
|
||||
|
||||
// Increase default amount of peers.
|
||||
config.server.p2p_config.peer_max_outbound_count = Some(24);
|
||||
config.server.p2p_config.peer_min_preferred_outbound_count = Some(18);
|
||||
|
||||
Settings::write_to_file(&config, path);
|
||||
config
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue