From cc8fab0f3bbb7cbb4ec97457e9681c3580178028 Mon Sep 17 00:00:00 2001 From: Itay Tsabary Date: Wed, 18 Dec 2024 20:38:47 +0200 Subject: [PATCH] chore(starknet_integration_tests): use available ports for monitoring endpoint commit-id:5c22c64a --- crates/starknet_integration_tests/src/utils.rs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/crates/starknet_integration_tests/src/utils.rs b/crates/starknet_integration_tests/src/utils.rs index 1710e62416..37d634f7e0 100644 --- a/crates/starknet_integration_tests/src/utils.rs +++ b/crates/starknet_integration_tests/src/utils.rs @@ -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); ( @@ -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,