Skip to content

Commit

Permalink
Add main node consensus port info
Browse files Browse the repository at this point in the history
  • Loading branch information
matias-gonz committed Sep 27, 2024
1 parent f505075 commit 4a89129
Showing 1 changed file with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,17 @@ fn prepare_configs(

let mut general_en = GeneralConfig::read_with_base_path(shell, en_configs_path)?;

let offset = ((config.id - 1) * 100) as u16;
let consensus_port_range = DEFAULT_CONSENSUS_PORT + offset..PORT_RANGE_END;
let consensus_port = ports.allocate_port(consensus_port_range, "Consensus".to_string())?;

// Set consensus config
let main_node_consensus_config = general
.consensus_config
.context(MSG_CONSENSUS_CONFIG_MISSING_ERR)?;
ports.add_port_info(
main_node_consensus_config.server_addr.port(),
"Main node consensus".to_string(),
);

let offset = ((config.id - 1) * 100) as u16;
let consensus_port_range = DEFAULT_CONSENSUS_PORT + offset..PORT_RANGE_END;
let consensus_port = ports.allocate_port(consensus_port_range, "Consensus".to_string())?;

let mut gossip_static_outbound = BTreeMap::new();
let main_node_public_key = node_public_key(
Expand Down

0 comments on commit 4a89129

Please sign in to comment.