Removed setting mining threads priority, as it seems that it has no effect.

Changed monitoring for chain changes in miner to support MIPS architecture (needs testing).
This commit is contained in:
Revertron committed 2021-03-21 14:34:32 +01:00
1 parent 0b5f5d0793
commit 0d719324a9
4 files changed
+27 -52

No files matched your search

-16
View File
@@ -1,7 +1,5 @@
use std::num;
use rand::Rng;
#[cfg(not(target_os = "macos"))]
use thread_priority::*;
pub mod constants;
pub use constants::*;
@@ -22,20 +20,6 @@ pub fn from_hex(string: &str) -> Result<Vec<u8>, num::ParseIntError> {
.collect()
}
#[cfg(not(target_os = "macos"))]
#[allow(unused_variables)]
pub fn setup_miner_thread(cpu: u32) {
let _ = set_current_thread_priority(ThreadPriority::Min);
#[cfg(target_os = "windows")]
let _ = set_current_thread_ideal_processor(IdealProcessor::from(cpu));
}
#[cfg(target_os = "macos")]
#[allow(unused_variables)]
pub fn setup_miner_thread(cpu: u32) {
// MacOS is not supported by thread_priority crate
}
pub fn check_domain(name: &str, allow_dots: bool) -> bool {
if name.starts_with('.') || name.starts_with('-') || name.ends_with('.') || name.ends_with('-') {
return false;