diff --git a/roles/Cargo.lock b/roles/Cargo.lock index 15f9fb513..5f834dd45 100644 --- a/roles/Cargo.lock +++ b/roles/Cargo.lock @@ -1351,6 +1351,7 @@ dependencies = [ "jd_client", "jd_server", "key-utils", + "mining_device_sv1", "minreq", "network_helpers_sv2", "once_cell", diff --git a/roles/tests-integration/Cargo.toml b/roles/tests-integration/Cargo.toml index e2a13fcd9..6e6f33c4d 100644 --- a/roles/tests-integration/Cargo.toml +++ b/roles/tests-integration/Cargo.toml @@ -25,6 +25,7 @@ once_cell = "1.19.0" network_helpers_sv2 = { path = "../roles-utils/network-helpers", features =["with_tokio","with_buffer_pool"] } pool_sv2 = { path = "../pool" } roles_logic_sv2 = { path = "../../protocols/v2/roles-logic-sv2" } +mining_device_sv1 = { path = "../test-utils/mining-device-sv1" } tar = "0.4.41" tokio = { version="1.36.0",features = ["full","tracing"] } tracing = "0.1.40" diff --git a/roles/tests-integration/tests/common/mod.rs b/roles/tests-integration/tests/common/mod.rs index f1022f382..25f5ce140 100644 --- a/roles/tests-integration/tests/common/mod.rs +++ b/roles/tests-integration/tests/common/mod.rs @@ -466,3 +466,10 @@ fn measure_hashrate(duration_secs: u64) -> f64 { hashes as f64 / elapsed_secs } + +pub async fn start_mining_device_sv1(upstream_addr: SocketAddr) { + tokio::spawn(async move { + mining_device_sv1::client::Client::connect(80, upstream_addr).await; + }); + tokio::time::sleep(std::time::Duration::from_secs(3)).await; +}