Skip to content

Commit 12a28e6

Browse files
chore(starknet_sequencer_node): remove redundant port allocation
1 parent a28f2c9 commit 12a28e6

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

crates/starknet_integration_tests/src/node_component_configs.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,6 @@ pub fn create_nodes_deployment_units_configs(
217217
let class_manager_socket = available_ports.get_next_local_host_socket();
218218
let gateway_socket = available_ports.get_next_local_host_socket();
219219
let mempool_socket = available_ports.get_next_local_host_socket();
220-
let mempool_p2p_socket = available_ports.get_next_local_host_socket();
221220
let sierra_compiler_socket = available_ports.get_next_local_host_socket();
222221
let state_sync_socket = available_ports.get_next_local_host_socket();
223222
let l1_provider_socket = available_ports.get_next_local_host_socket();
@@ -242,11 +241,6 @@ pub fn create_nodes_deployment_units_configs(
242241
mempool_socket.ip(),
243242
mempool_socket.port(),
244243
);
245-
let mempool_p2p_remote_config_pair = DistributedNodeServiceConfigPair::new(
246-
Ipv4Addr::LOCALHOST.to_string(),
247-
mempool_p2p_socket.ip(),
248-
mempool_p2p_socket.port(),
249-
);
250244
let sierra_compiler_remote_config_pair = DistributedNodeServiceConfigPair::new(
251245
Ipv4Addr::LOCALHOST.to_string(),
252246
sierra_compiler_socket.ip(),
@@ -283,7 +277,6 @@ pub fn create_nodes_deployment_units_configs(
283277
),
284278
get_mempool_config(
285279
mempool_remote_config_pair.local(),
286-
mempool_p2p_remote_config_pair.local(),
287280
class_manager_remote_config_pair.remote(),
288281
gateway_remote_config_pair.remote(),
289282
),

crates/starknet_sequencer_node/src/deployment.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ impl DistributedNodeServiceName {
274274
// TODO(Tsabary): consider alternatives that enable removing the linter suppression.
275275
#[allow(clippy::as_conversions)]
276276
fn get_port_offset(&self) -> u16 {
277-
self.clone() as u16
277+
*self as u16
278278
}
279279
}
280280

@@ -362,13 +362,12 @@ pub fn get_gateway_config(
362362

363363
pub fn get_mempool_config(
364364
mempool_local_config: ReactiveComponentExecutionConfig,
365-
mempool_p2p_local_config: ReactiveComponentExecutionConfig,
366365
class_manager_remote_config: ReactiveComponentExecutionConfig,
367366
gateway_remote_config: ReactiveComponentExecutionConfig,
368367
) -> ComponentConfig {
369368
let mut config = ComponentConfig::disabled();
370369
config.mempool = mempool_local_config;
371-
config.mempool_p2p = mempool_p2p_local_config;
370+
config.mempool_p2p = ReactiveComponentExecutionConfig::local_with_remote_disabled();
372371
config.class_manager = class_manager_remote_config;
373372
config.gateway = gateway_remote_config;
374373
config.monitoring_endpoint = ActiveComponentExecutionConfig::enabled();

0 commit comments

Comments
 (0)