diff --git a/protocols/Cargo.toml b/protocols/Cargo.toml index 29fe7e95d..dc151d871 100644 --- a/protocols/Cargo.toml +++ b/protocols/Cargo.toml @@ -14,6 +14,8 @@ keywords = ["stratum", "mining", "bitcoin", "protocol"] [workspace] +resolver="2" + members = [ "v1", "v2/binary-sv2/serde-sv2", @@ -38,4 +40,4 @@ opt-level = 1 [profile.test] # Required by super_safe_lock -opt-level = 1 \ No newline at end of file +opt-level = 1 diff --git a/roles/Cargo.toml b/roles/Cargo.toml index 8b93e2b85..a211e37cc 100644 --- a/roles/Cargo.toml +++ b/roles/Cargo.toml @@ -14,6 +14,8 @@ keywords = ["stratum", "mining", "bitcoin", "protocol"] [workspace] +resolver="2" + members = [ "mining-proxy", "pool", @@ -30,4 +32,4 @@ opt-level = 1 [profile.test] # Required by super_safe_lock -opt-level = 1 \ No newline at end of file +opt-level = 1 diff --git a/test/message-generator/test/jds-do-not-fail-on-wrong-tsdatasucc.json b/test/message-generator/test/jds-do-not-fail-on-wrong-tsdatasucc.json index 64f9a9fcd..60d82db13 100644 --- a/test/message-generator/test/jds-do-not-fail-on-wrong-tsdatasucc.json +++ b/test/message-generator/test/jds-do-not-fail-on-wrong-tsdatasucc.json @@ -50,6 +50,7 @@ { "output_string": "MATCHED MESSAGE TYPE 1", "output_location": "StdOut", + "late_condition": false, "condition": true } ], diff --git a/utils/Cargo.toml b/utils/Cargo.toml index 89f448c63..385d52a0c 100644 --- a/utils/Cargo.toml +++ b/utils/Cargo.toml @@ -13,6 +13,7 @@ license-file = "LICENSE.md" keywords = ["stratum", "mining", "bitcoin", "protocol"] [workspace] +resolver="2" members = [ "network-helpers", diff --git a/utils/message-generator/src/executor.rs b/utils/message-generator/src/executor.rs index 0ec1fba83..b69bce0e6 100644 --- a/utils/message-generator/src/executor.rs +++ b/utils/message-generator/src/executor.rs @@ -41,7 +41,9 @@ impl Executor { while pid.is_some() { let p = process[index].as_mut(); pid = p.as_ref().unwrap().id(); - p.unwrap().kill().await.expect("Failed to kill process"); + if p.unwrap().kill().await.is_err() { + error!("Process already dead"); + }; tokio::time::sleep(std::time::Duration::from_millis(1000)).await; } let _p = process[index].as_mut(); diff --git a/utils/message-generator/src/executor_sv1.rs b/utils/message-generator/src/executor_sv1.rs index 1fac3c386..507265c8a 100644 --- a/utils/message-generator/src/executor_sv1.rs +++ b/utils/message-generator/src/executor_sv1.rs @@ -6,13 +6,10 @@ use async_channel::{Receiver, Sender}; use std::{collections::HashMap, sync::Arc}; use v1::Message; -use tokio::{ - fs::File, - io::{copy, BufReader, BufWriter}, -}; use tracing::{debug, error, info}; pub struct Sv1Executor { + #[allow(dead_code)] name: Arc, send_to_up: Option>, recv_from_up: Option>, @@ -174,26 +171,10 @@ impl Sv1Executor { .await .unwrap(); } - let mut child_no = 0; #[allow(clippy::manual_flatten)] for child in self.process { if let Some(mut child) = child { - // Spawn a task to read the child process's stdout and write it to the file - let stdout = child.stdout.take().unwrap(); - let mut stdout_reader = BufReader::new(stdout); - child_no += 1; - let test_name = self.name.clone(); - tokio::spawn(async move { - let test_name = &*test_name; - let mut file = File::create(format!("{}.child-{}.log", test_name, child_no)) - .await - .unwrap(); - let mut stdout_writer = BufWriter::new(&mut file); - - copy(&mut stdout_reader, &mut stdout_writer).await.unwrap(); - }); - while child.id().is_some() { // Sends kill signal and waits 1 second before checking to ensure child was killed child.kill().await.expect("Failed to kill process");