Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add get_http_server_config function #2637

Open
wants to merge 1 commit into
base: spr/main/5edf2768
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions crates/starknet_integration_tests/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ use starknet_http_server::config::HttpServerConfig;
use starknet_mempool_p2p::config::MempoolP2pConfig;
use starknet_monitoring_endpoint::config::MonitoringEndpointConfig;
use starknet_sequencer_infra::test_utils::get_available_socket;
use starknet_sequencer_node::config::component_execution_config::ActiveComponentExecutionMode;
use starknet_sequencer_node::config::node_config::SequencerNodeConfig;
use starknet_sequencer_node::config::test_utils::RequiredParams;
use starknet_types_core::felt::Felt;
Expand Down Expand Up @@ -277,3 +278,15 @@ fn create_monitoring_endpoint_config(sequencer_index: usize) -> MonitoringEndpoi
config.port += u16::try_from(sequencer_index).unwrap();
config
}

pub fn get_http_server_config(configs: &[SequencerNodeConfig]) -> Option<&HttpServerConfig> {
configs
.iter()
.find(|config| {
matches!(
config.components.http_server.execution_mode,
ActiveComponentExecutionMode::Enabled
)
})
.map(|config| &config.http_server_config)
}
Loading