Optimized p2p connections.
Added a limit for 10 active connections to save bandwidth and CPU.
This commit is contained in:
+2
-2
@@ -243,13 +243,13 @@ fn action_loaded(context: &Arc<Mutex<Context>>, web_view: &mut WebView<()>) {
|
||||
}
|
||||
s
|
||||
}
|
||||
Event::MinerStats { thread, speed, max_diff, aim_diff } => {
|
||||
Event::MinerStats { thread, speed, max_diff, target_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, aim_diff)
|
||||
format!("setLeftStatusBarText('Mining speed {} H/s, max found difficulty {}/{}.'); showMiningIndicator(true, false);", status.get_speed(), status.max_diff, target_diff)
|
||||
} else {
|
||||
String::new()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user