Skip to content

Commit

Permalink
make tecdsa configurable in test driver
Browse files Browse the repository at this point in the history
  • Loading branch information
mraszyk committed Jul 4, 2023
1 parent 12ef5e1 commit 9bc14a9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion rs/tests/src/driver/bootstrap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ pub fn init_ic(
subnet.max_instructions_per_round,
subnet.max_instructions_per_install_code,
subnet.features.map(|f| f.into()),
None,
subnet.ecdsa_config.clone().map(|c| c.into()),
subnet.max_number_of_canisters,
subnet.ssh_readonly_access.clone(),
subnet.ssh_backup_access.clone(),
Expand Down
10 changes: 9 additions & 1 deletion rs/tests/src/driver/ic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use ic_prep_lib::node::NodeSecretKeyStore;
use ic_prep_lib::prep_state_directory::IcPrepStateDir;
use ic_protobuf::registry::subnet::v1::GossipConfig;
use ic_regedit;
use ic_registry_subnet_features::SubnetFeatures;
use ic_registry_subnet_features::{EcdsaConfig, SubnetFeatures};
use ic_registry_subnet_type::SubnetType;
use ic_types::malicious_behaviour::MaliciousBehaviour;
use ic_types::p2p::build_default_gossip_config;
Expand Down Expand Up @@ -334,6 +334,7 @@ pub struct Subnet {
pub max_number_of_canisters: Option<u64>,
pub ssh_readonly_access: Vec<String>,
pub ssh_backup_access: Vec<String>,
pub ecdsa_config: Option<EcdsaConfig>,
}

impl Subnet {
Expand All @@ -360,6 +361,7 @@ impl Subnet {
subnet_type,
ssh_readonly_access: vec![],
ssh_backup_access: vec![],
ecdsa_config: None,
}
}

Expand Down Expand Up @@ -503,6 +505,11 @@ impl Subnet {
self
}

pub fn with_ecdsa_config(mut self, ecdsa_config: EcdsaConfig) -> Self {
self.ecdsa_config = Some(ecdsa_config);
self
}

pub fn add_malicious_nodes(
mut self,
no_of_nodes: usize,
Expand Down Expand Up @@ -550,6 +557,7 @@ impl Default for Subnet {
max_number_of_canisters: None,
ssh_readonly_access: vec![],
ssh_backup_access: vec![],
ecdsa_config: None,
}
}
}
Expand Down

0 comments on commit 9bc14a9

Please sign in to comment.