Skip to content

Commit

Permalink
Add SV1 Mining device initializers
Browse files Browse the repository at this point in the history
  • Loading branch information
jbesraa authored and plebhash committed Nov 20, 2024
1 parent 37f6e05 commit 747ac05
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions roles/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions roles/tests-integration/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
7 changes: 7 additions & 0 deletions roles/tests-integration/tests/common/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -471,3 +471,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;
}

0 comments on commit 747ac05

Please sign in to comment.