From aa79efa354701fd8f71ca0b4f60e3e402d943980 Mon Sep 17 00:00:00 2001 From: nadin-Starkware Date: Mon, 9 Dec 2024 09:43:24 +0200 Subject: [PATCH] chore: add get_http_server_config function commit-id:ef3f60fd --- crates/starknet_integration_tests/src/utils.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/crates/starknet_integration_tests/src/utils.rs b/crates/starknet_integration_tests/src/utils.rs index 2ebdec966a..14fdcde07f 100644 --- a/crates/starknet_integration_tests/src/utils.rs +++ b/crates/starknet_integration_tests/src/utils.rs @@ -227,3 +227,17 @@ pub fn create_batcher_config( ..Default::default() } } + +pub fn get_http_server_config(configs: &[SequencerNodeConfig]) -> Option<&HttpServerConfig> { + configs + .iter() + .find(|config| { + matches!( + config.components.http_server.execution_mode, + ComponentExecutionMode::Remote + | ComponentExecutionMode::LocalExecutionWithRemoteEnabled + | ComponentExecutionMode::LocalExecutionWithRemoteDisabled + ) + }) + .map(|config| &config.http_server_config) +}