Skip to content

Commit

Permalink
chore: Remove open head
Browse files Browse the repository at this point in the history
  • Loading branch information
gonzalezzfelipe committed Nov 8, 2024
1 parent 9451e11 commit 3b7a515
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 47 deletions.
2 changes: 0 additions & 2 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ pub fn get_config() -> &'static Config {
pub struct Config {
pub image: String,
pub init_image: String,
pub open_head_image: String,
pub sidecar_image: String,
pub configmap: String,
pub secret: String,
Expand All @@ -34,7 +33,6 @@ impl Config {
pub fn from_env() -> Self {
Self {
image: env::var("IMAGE").unwrap_or("ghcr.io/cardano-scaling/hydra-node".into()),
open_head_image: env::var("OPEN_HEAD_IMAGE").expect("Missing OPEN_HEAD_IMAGE env var"),
sidecar_image: env::var("SIDECAR_IMAGE").expect("Missing SIDECAR_IMAGE env var"),
configmap: env::var("CONFIGMAP").expect("Missing CONFIGMAP env var"),
secret: env::var("SECRET").expect("Missing SECRET env var"),
Expand Down
45 changes: 0 additions & 45 deletions src/custom_resource.rs
Original file line number Diff line number Diff line change
Expand Up @@ -283,51 +283,6 @@ impl HydraDoomNode {

// Offline is optional. If undefined, the node is presumed to be online.
if !self.spec.offline.unwrap_or(false) {
let mut open_head_args = vec![
"open-head".to_string(),
"--network-id".to_string(),
self.spec.network_id.unwrap_or(0).to_string(),
"--seed-input".to_string(),
self.spec.seed_input.clone(),
"--participant".to_string(),
config.admin_addr.clone(),
"--party-verification-file".to_string(),
format!("{}/keys/hydra.vk", constants.data_dir),
"--cardano-key-file".to_string(),
format!("{}/admin.sk", constants.secret_dir),
"--blockfrost-key".to_string(),
config.blockfrost_key.clone(),
];
if !self.spec.commit_inputs.is_empty() {
open_head_args.push("--commit-inputs".to_string());
open_head_args.extend(self.spec.commit_inputs.clone());
}

containers.push(Container {
name: "open-head".to_string(),
image: Some(config.open_head_image.clone()),
args: Some(open_head_args),
volume_mounts: Some(vec![
VolumeMount {
name: "config".to_string(),
mount_path: constants.config_dir.clone(),
..Default::default()
},
VolumeMount {
name: "secret".to_string(),
mount_path: constants.secret_dir.clone(),
..Default::default()
},
VolumeMount {
name: "data".to_string(),
mount_path: constants.data_dir.clone(),
..Default::default()
},
]),
resources: None,
..Default::default()
});

containers.push(Container {
name: "dmtrctl".to_string(),
image: Some(constants.dmtrctl_image.to_string()),
Expand Down

0 comments on commit 3b7a515

Please sign in to comment.