diff --git a/crates/starknet_integration_tests/src/utils.rs b/crates/starknet_integration_tests/src/utils.rs index 37d634f7e07..944f2122a80 100644 --- a/crates/starknet_integration_tests/src/utils.rs +++ b/crates/starknet_integration_tests/src/utils.rs @@ -69,7 +69,8 @@ pub async fn create_config( let rpc_state_reader_config = test_rpc_state_reader_config(rpc_server_addr); 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); + let state_sync_config = + create_state_sync_config(state_sync_storage_config, available_ports.get_next_port()); ( SequencerNodeConfig { @@ -277,12 +278,12 @@ fn set_validator_id(consensus_manager_config: &mut ConsensusManagerConfig, seque .unwrap(); } -pub fn create_state_sync_config( +fn create_state_sync_config( state_sync_storage_config: StorageConfig, - sequencer_index: usize, + port: u16, ) -> StateSyncConfig { let mut config = StateSyncConfig { storage_config: state_sync_storage_config, ..Default::default() }; - config.network_config.tcp_port += u16::try_from(sequencer_index).unwrap(); + config.network_config.tcp_port = port; config }