wildtiger 0.0.3

Proof-of-work (PoW) algorithm that is optimized for general-purpose CPUs
Documentation


use crate::rpc::{Config, RpcConfig, Worker};

use crate::runner::Runner;

#[derive(Clone)]
pub struct RandomxConfig {
    pub rpc_config: RpcConfig,
    pub concurrent_jobs: u16,
}

impl Config for RandomxConfig {
    fn rpc_config(&self) -> RpcConfig {
        self.rpc_config.clone()
    }

    fn jobs(&self) -> usize {
        self.concurrent_jobs as usize
    }

    fn worker(&self) -> Box<dyn Worker> {
        Box::new(Runner::new())
    }
}