From a41c529201b6f2ef556617a02b3daae46d75f993 Mon Sep 17 00:00:00 2001 From: Gary Mathews Date: Wed, 5 Nov 2025 08:55:14 -0800 Subject: [PATCH] set default threads to logical cpu count --- src/cli.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cli.rs b/src/cli.rs index ee3c18c..05d679c 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -21,7 +21,7 @@ pub struct Cli { pub address: Option, /// Number of worker threads to use for mining. - #[arg(long, default_value_t = 24)] + #[arg(long, default_value_t = std::thread::available_parallelism().map(|n| n.get() as u32).unwrap_or(24))] pub threads: u32, /// Optional secret key (hex-encoded) to mine with.