diff --git a/src/event.rs b/src/event.rs index 2747efa..42d2588 100644 --- a/src/event.rs +++ b/src/event.rs @@ -4,7 +4,7 @@ use crate::{Bytes, Keystore}; pub enum Event { MinerStarted, MinerStopped { success: bool, full: bool }, - MinerStats { thread: usize, speed: u64, max_diff: u32 }, + MinerStats { thread: usize, speed: u64, max_diff: u32, aim_diff: u32 }, KeyGeneratorStarted, KeyGeneratorStopped, KeyCreated { path: String, public: String, hash: String }, diff --git a/src/miner.rs b/src/miner.rs index dff18fc..0b4832b 100644 --- a/src/miner.rs +++ b/src/miner.rs @@ -253,7 +253,7 @@ fn find_hash(context: Arc>, mut block: Block, running: Arc>, web_view: &mut WebView<()>) { } s } - Event::MinerStats { thread, speed, max_diff } => { + Event::MinerStats { thread, speed, max_diff, aim_diff } => { if status.max_diff < max_diff { status.max_diff = max_diff; } status.set_thread_speed(thread, speed); if thread == threads - 1 { - format!("setLeftStatusBarText('Mining speed {} H/s, max found difficulty {}.'); showMiningIndicator(true, false);", status.get_speed(), status.max_diff) + format!("setLeftStatusBarText('Mining speed {} H/s, max found difficulty {}/{}.'); showMiningIndicator(true, false);", status.get_speed(), status.max_diff, aim_diff) } else { String::new() }