Skip to content

Commit a56459f

Browse files
committed
Merge branch 'multi-node-setup' of github.com:chainwayxyz/citrea-e2e into new-sequencer-config
2 parents 4677b4c + ae77738 commit a56459f

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

src/docker.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![allow(deprecated)] // Allowing deprecation for now as v0.19.1 has bogus warning messages that cannot be fixed as of now. TODO remove when possible
1+
#![allow(deprecated)] // Allowing deprecation for now as bollard v0.19.1 has bogus warning messages that cannot be fixed as of now. TODO remove when possible
22
use std::{
33
collections::{HashMap, HashSet},
44
path::PathBuf,

src/framework.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -611,14 +611,14 @@ fn generate_sequencer_configs<T: TestCase>(
611611
dbs_dir: &Path,
612612
bind_host: &str,
613613
) -> Result<Vec<FullSequencerConfig>> {
614-
let sequencer = T::sequencer_config();
614+
let sequencer = T::sequencer_cluster_config();
615615
let env = T::test_env();
616616
let throttle_config = T::throttle_config();
617617
let kind = NodeKind::Sequencer;
618618
let citrea_docker_image = std::env::var("CITREA_DOCKER_IMAGE").ok();
619619

620620
let mut sequencer_configs = vec![];
621-
for i in 0..test_case.get_n_nodes(kind) {
621+
for (i, config) in (0..test_case.get_n_nodes(kind)).zip(sequencer.into_iter()) {
622622
let sequencer_dir = dir.join(i.to_string());
623623
std::fs::create_dir_all(&sequencer_dir)
624624
.with_context(|| format!("Failed to create {} directory", sequencer_dir.display()))?;
@@ -649,7 +649,7 @@ fn generate_sequencer_configs<T: TestCase>(
649649

650650
sequencer_configs.push(FullSequencerConfig::new(
651651
NodeKind::Sequencer,
652-
sequencer.clone(),
652+
config,
653653
sequencer_rollup,
654654
citrea_docker_image.clone(),
655655
sequencer_dir,

src/test_case.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,13 @@ pub trait TestCase: Send + Sync + 'static {
215215
SequencerConfig::default()
216216
}
217217

218+
/// Returns the sequencer cluster configuration for the test.
219+
/// Override this method to provide a custom sequencer cluster configuration.
220+
/// TODO remove when consolidated to single sequencer/sequencer_cluster handling
221+
fn sequencer_cluster_config() -> Vec<SequencerConfig> {
222+
vec![Self::sequencer_config()]
223+
}
224+
218225
/// Returns the batch prover configuration for the test.
219226
/// Override this method to provide a custom batch prover configuration.
220227
fn batch_prover_config() -> BatchProverConfig {

0 commit comments

Comments
 (0)