diff --git a/orchestration/src/coins/bitcoin.rs b/orchestration/src/coins/bitcoin.rs index f8b6b7fc..a5c8b21c 100644 --- a/orchestration/src/coins/bitcoin.rs +++ b/orchestration/src/coins/bitcoin.rs @@ -43,8 +43,7 @@ CMD ["/run.sh"] network.label() ); - let run = - os(Os::Debian, "", "bitcoin") + &run_bitcoin; + let run = os(Os::Debian, "", "bitcoin") + &run_bitcoin; let res = setup + &run; let mut bitcoin_path = orchestration_path.to_path_buf(); diff --git a/orchestration/src/coins/monero.rs b/orchestration/src/coins/monero.rs index 7df874d2..873c6458 100644 --- a/orchestration/src/coins/monero.rs +++ b/orchestration/src/coins/monero.rs @@ -55,11 +55,9 @@ CMD ["/run.sh"] network.label(), ); - let run = crate::os( - os, - if os == Os::Alpine { "RUN apk --no-cache add gcompat" } else { "" }, - "monero", - ) + &run_monero; + let run = + crate::os(os, if os == Os::Alpine { "RUN apk --no-cache add gcompat" } else { "" }, "monero") + + &run_monero; let res = setup + &run; let mut monero_path = orchestration_path.to_path_buf(); diff --git a/orchestration/src/main.rs b/orchestration/src/main.rs index c942efe2..988358bc 100644 --- a/orchestration/src/main.rs +++ b/orchestration/src/main.rs @@ -2,7 +2,14 @@ // TODO: Generate keys for a validator and the infra use core::ops::Deref; -use std::{collections::HashSet, env, path::PathBuf, io::Write, fs, process::Command}; +use std::{ + collections::HashSet, + env, + path::PathBuf, + io::Write, + fs, + process::{Stdio, Command}, +}; use zeroize::Zeroizing; @@ -443,19 +450,23 @@ fn start(network: Network, services: HashSet) { command } else { // Assign a persistent volume if this isn't for Dev - command.arg("--volume").arg(volume); - } + command.arg("--volume").arg(volume) + }; let command = match name { "bitcoin" => { // Expose the RPC for tests if network == Network::Dev { command.arg("-p").arg("8332:8332") + } else { + command } } "monero" => { // Expose the RPC for tests if network == Network::Dev { command.arg("-p").arg("18081:18081") + } else { + command } } "monero-wallet-rpc" => { @@ -466,13 +477,13 @@ fn start(network: Network, services: HashSet) { "coordinator" => { if network == Network::Dev { command - else { + } else { // Publish the port command.arg("-p").arg("30563:30563") } } "serai" => { - let mut command = command.arg("--volume").arg(format!("{serai_runtime_volume}:/runtime"); + let command = command.arg("--volume").arg(format!("{serai_runtime_volume}:/runtime")); if network == Network::Dev { command } else {