Skip to content

Commit

Permalink
chore: rename create_config function
Browse files Browse the repository at this point in the history
commit-id:9b08c150
  • Loading branch information
nadin-Starkware committed Dec 25, 2024
1 parent bff6728 commit 5a4f75f
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
16 changes: 8 additions & 8 deletions crates/starknet_integration_tests/src/flow_test_setup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ use tracing::{debug, instrument};
use crate::state_reader::{spawn_test_rpc_state_reader, StorageTestSetup};
use crate::utils::{
create_chain_info,
create_config,
create_consensus_manager_configs_and_channels,
create_mempool_p2p_configs,
create_node_config,
};

const SEQUENCER_0: usize = 0;
Expand Down Expand Up @@ -109,7 +109,7 @@ pub struct FlowSequencerSetup {
pub state_sync_storage_file_handle: TempDir,

// Node configuration.
pub config: SequencerNodeConfig,
pub node_config: SequencerNodeConfig,

// Monitoring client.
pub is_alive_test_client: IsAliveClient,
Expand Down Expand Up @@ -137,7 +137,7 @@ impl FlowSequencerSetup {
let component_config = ComponentConfig::default();

// Derive the configuration for the sequencer node.
let (config, _required_params) = create_config(
let (node_config, _required_params) = create_node_config(
&mut available_ports,
sequencer_index,
chain_info,
Expand All @@ -150,13 +150,13 @@ impl FlowSequencerSetup {
)
.await;

debug!("Sequencer config: {:#?}", config);
let (_clients, servers) = create_node_modules(&config);
debug!("Sequencer config: {:#?}", node_config);
let (_clients, servers) = create_node_modules(&node_config);

let MonitoringEndpointConfig { ip, port, .. } = config.monitoring_endpoint_config;
let MonitoringEndpointConfig { ip, port, .. } = node_config.monitoring_endpoint_config;
let is_alive_test_client = IsAliveClient::new(SocketAddr::from((ip, port)));

let HttpServerConfig { ip, port } = config.http_server_config;
let HttpServerConfig { ip, port } = node_config.http_server_config;
let add_tx_http_client = HttpTestClient::new(SocketAddr::from((ip, port)));

// Run the sequencer node.
Expand All @@ -168,7 +168,7 @@ impl FlowSequencerSetup {
batcher_storage_file_handle: storage_for_test.batcher_storage_handle,
rpc_storage_file_handle: storage_for_test.rpc_storage_handle,
state_sync_storage_file_handle: storage_for_test.state_sync_storage_handle,
config,
node_config,
is_alive_test_client,
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ use crate::config_utils::dump_config_file_changes;
use crate::state_reader::{spawn_test_rpc_state_reader_with_socket, StorageTestSetup};
use crate::utils::{
create_chain_info,
create_config,
create_consensus_manager_configs_and_channels,
create_mempool_p2p_configs,
create_node_config,
};

pub struct IntegrationTestSetup {
Expand Down Expand Up @@ -164,7 +164,7 @@ impl IntegrationSequencerSetup {
.await;

// Derive the configuration for the sequencer node.
let (config, required_params) = create_config(
let (config, required_params) = create_node_config(
available_ports,
sequencer_index,
chain_info,
Expand Down
2 changes: 1 addition & 1 deletion crates/starknet_integration_tests/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ pub fn create_chain_info() -> ChainInfo {
// TODO(yair, Tsabary): Create config presets for tests, then remove all the functions that modify
// the config.
#[allow(clippy::too_many_arguments)]
pub async fn create_config(
pub async fn create_node_config(
available_ports: &mut AvailablePorts,
sequencer_index: usize,
chain_info: ChainInfo,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ async fn end_to_end_flow(mut tx_generator: MultiAccountTransactionGenerator) {
let expected_validator_id = expected_proposer_iter
.next()
.unwrap()
.config
.node_config
.consensus_manager_config
.consensus_config
.validator_id;
Expand Down

0 comments on commit 5a4f75f

Please sign in to comment.