Skip to content

Commit

Permalink
chore(starknet_integration_tests): pass the number of composed sequen…
Browse files Browse the repository at this point in the history
…cer as an arg (#3283)

commit-id:613d3ef2
  • Loading branch information
nadin-Starkware authored Jan 13, 2025
1 parent 737a133 commit d23aa5d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion crates/starknet_integration_tests/src/flow_test_setup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,9 @@ pub fn create_consensus_manager_configs_and_channels(
),
);

let n_network_configs = network_configs.len();
let consensus_manager_configs =
create_consensus_manager_configs_from_network_configs(network_configs);
create_consensus_manager_configs_from_network_configs(network_configs, n_network_configs);

(consensus_manager_configs, broadcast_channels)
}
1 change: 1 addition & 0 deletions crates/starknet_integration_tests/src/sequencer_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ pub(crate) async fn get_sequencer_setup_configs(

let consensus_manager_configs = create_consensus_manager_configs_from_network_configs(
create_connected_network_configs(available_ports.get_next_ports(n_distributed_sequencers)),
component_configs.len(),
);

// TODO(Nadin): define the test storage here and pass it to the create_state_sync_configs and to
Expand Down
3 changes: 2 additions & 1 deletion crates/starknet_integration_tests/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,15 @@ pub async fn create_node_config(

pub(crate) fn create_consensus_manager_configs_from_network_configs(
network_configs: Vec<NetworkConfig>,
n_composed_nodes: usize,
) -> Vec<ConsensusManagerConfig> {
// TODO(Matan, Dan): set reasonable default timeouts.
let mut timeouts = TimeoutsConfig::default();
timeouts.precommit_timeout *= 3;
timeouts.prevote_timeout *= 3;
timeouts.proposal_timeout *= 3;

let num_validators = u64::try_from(network_configs.len()).unwrap();
let num_validators = u64::try_from(n_composed_nodes).unwrap();

network_configs
.into_iter()
Expand Down

0 comments on commit d23aa5d

Please sign in to comment.