fn process_get_mining_state(&mut self) {
        if self.wallet_output_service.is_some() {
            let cur_state = self.enable_miner.load(Ordering::SeqCst);
            let mining_status = self.mining_status.load(Ordering::SeqCst);
            match cur_state {
                true => println!("Mining is ENABLED by the user"),
                false => println!("Mining is DISABLED by the user"),
            }
            match mining_status {
                true => println!("Mining state is currently ON"),
                false => println!("Mining state is currently OFF"),
            }
            let hashrate = self.miner_hashrate.load(Ordering::SeqCst);
            let total_hashrate = (self.miner_thread_count * hashrate) as f64 / 1_000_000.0;
            println!("Mining hash rate is: {:.6} MH/s", total_hashrate);
        } else {
            println!("Cannot complete command, Wallet is disabled so Mining is also disabled");
        }
    }
/// Function to process the get_mining_state command
Function to process the get_mining_state command
Function to process the get_mining_state command
fn process_get_mining_state(&mut self) {
        if self.wallet_output_service.is_some() {
            let cur_state = self.enable_miner.load(Ordering::SeqCst);
            let mining_status = self.mining_status.load(Ordering::SeqCst);
            match cur_state {
                true => println!("Mining is ENABLED by the user"),
                false => println!("Mining is DISABLED by the user"),
            }
            match mining_status {
                true => println!("Mining state is currently ON"),
                false => println!("Mining state is currently OFF"),
            }
            let hashrate = self.miner_hashrate.load(Ordering::SeqCst);
            let total_hashrate = (self.miner_thread_count * hashrate) as f64 / 1_000_000.0;
            println!("Mining hash rate is: {:.6} MH/s", total_hashrate);
        } else {
            println!("Cannot complete command, Wallet is disabled so Mining is also disabled");
        }
    }
fn process_get_mining_state ( & mut self ) { if self . wallet_output_service . is_some ( ) { let cur_state = self . enable_miner . load ( Ordering :: SeqCst ) ; let mining_status = self . mining_status . load ( Ordering :: SeqCst ) ; match cur_state { true => println ! ( " " ) , false => println ! ( " " ) , } match mining_status { true => println ! ( " " ) , false => println ! ( " " ) , } let hashrate = self . miner_hashrate . load ( Ordering :: SeqCst ) ; let total_hashrate = ( self . miner_thread_count * hashrate ) as f64 / 1_000_000.0 ; println ! ( " " total_hashrate ) ; } else { println ! ( " " ) ; } }
Function to process the get_mining_state command
Function to process the get_mining_state command
&mut self
&mut self