Skip to content

Commit

Permalink
fix: reduce gpuminer version
Browse files Browse the repository at this point in the history
  • Loading branch information
stringhandler committed Oct 9, 2024
1 parent 164b295 commit 42d0a14
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src-tauri/binaries_versions_esmeralda.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"minotari_node": "1.6.0-pre.0",
"wallet": "1.6.0-pre.0",
"sha-p2pool": "0.1.9",
"xtrgpuminer": "0.1.13",
"xtrgpuminer": "0.1.10",
"tor": "13.5.6"
}
}
13 changes: 13 additions & 0 deletions src-tauri/src/gpu_miner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,25 @@ impl GpuMiner {
Ok(())
}

pub async fn is_running(&self) -> bool {
let process_watcher = self.watcher.read().await;
process_watcher.is_running()
}

pub async fn status(
&mut self,
network_hash_rate: u64,
block_reward: MicroMinotari,
) -> Result<GpuMinerStatus, anyhow::Error> {
let process_watcher = self.watcher.read().await;
if !process_watcher.is_running() {
return Ok(GpuMinerStatus {
hash_rate: 0,
estimated_earnings: 0,
is_mining: false,
is_available: self.is_available,
});
}
match &process_watcher.status_monitor {
Some(status_monitor) => {
let mut status = status_monitor.status().await?;
Expand Down

0 comments on commit 42d0a14

Please sign in to comment.