Skip to content

Commit

Permalink
chore(starknet_integration_tests): use available ports for monitoring…
Browse files Browse the repository at this point in the history
… endpoint

commit-id:5c22c64a
  • Loading branch information
Itay-Tsabary-Starkware committed Dec 18, 2024
1 parent ad4f70c commit cc8fab0
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions crates/starknet_integration_tests/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ pub async fn create_config(
let http_server_config =
create_http_server_config(available_ports.get_next_local_host_socket()).await;
let rpc_state_reader_config = test_rpc_state_reader_config(rpc_server_addr);
let monitoring_endpoint_config = create_monitoring_endpoint_config(sequencer_index);
let monitoring_endpoint_config =
MonitoringEndpointConfig { port: available_ports.get_next_port(), ..Default::default() };
let state_sync_config = create_state_sync_config(state_sync_storage_config, sequencer_index);

(
Expand Down Expand Up @@ -276,12 +277,6 @@ fn set_validator_id(consensus_manager_config: &mut ConsensusManagerConfig, seque
.unwrap();
}

fn create_monitoring_endpoint_config(sequencer_index: usize) -> MonitoringEndpointConfig {
let mut config = MonitoringEndpointConfig::default();
config.port += u16::try_from(sequencer_index).unwrap();
config
}

pub fn create_state_sync_config(
state_sync_storage_config: StorageConfig,
sequencer_index: usize,
Expand Down

0 comments on commit cc8fab0

Please sign in to comment.