diff --git a/README.md b/README.md index 1d8f62e..26485a4 100644 --- a/README.md +++ b/README.md @@ -240,8 +240,9 @@ on clean shutdown**. The per-card stats line shows live `Sol/s`, board `W`, and ./target/release/jackpotminer --selftest ``` -Key flags: `--url`, `--port` (fallback when the URL omits one), `--user` (`-u`), -`--pass` (`-p`), `--backend` (`opencl`/`cuda`), `--devices` (e.g. `0,1` or `all`), +Key flags: `--url` (defaults to `stratum+tcp://zcl.jackpot.tools:3333` when +unset), `--port` (fallback when the URL omits one), `--user` (`-u`), +`--pass` (`-p`), `--backend` (`mixed`/`opencl`/`cuda`), `--devices` (e.g. `0,1` or `all`), `--device` (`-d`, for single-device benchmark/debug), `--threads` (`-t`), `--cpu`, `--benchmark N`, `--list-devices`, `--selftest`. When mining in a terminal a live ratatui **dashboard** is shown by default (per-card Sol/s, power, temperature, diff --git a/mine.example.toml b/mine.example.toml index 15c76a8..4b22f1c 100644 --- a/mine.example.toml +++ b/mine.example.toml @@ -12,7 +12,8 @@ # jackpotminer --config mine.toml # ── Pool (required) ─────────────────────────────────────────────────────────── -url = "stratum+tcp://zcl.pool.example:3032" # stratum+tcp://host:port, or host:port +url = "stratum+tcp://zcl.jackpot.tools:3333" # stratum+tcp://host:port, or host:port + # (this is also the built-in default if unset) user = "t1YourZClassicAddressHere.rig1" # payout address / worker login # port = 3032 # only if `url` has no ":port" diff --git a/src/main.rs b/src/main.rs index 9ed4ea9..b8ff4be 100644 --- a/src/main.rs +++ b/src/main.rs @@ -42,6 +42,9 @@ use log::{info, warn}; use crate::miner::BackendSpec; use crate::stratum::StratumClient; +/// Pool used when neither `--url` nor a config file specifies one. +const DEFAULT_POOL_URL: &str = "stratum+tcp://zcl.jackpot.tools:3333"; + /// Command-line options. #[derive(Parser, Debug)] #[command(name = "jackpotminer", version, about = "equihash 192,7 miner")] @@ -53,7 +56,8 @@ struct Args { #[arg(long, value_name = "FILE")] config: Option, - /// Pool URL, e.g. stratum+tcp://zcl.pool.example:3032 + /// Pool URL, e.g. stratum+tcp://zcl.pool.example:3032. Defaults to + /// stratum+tcp://zcl.jackpot.tools:3333 when unset (here and in the config). #[arg(long)] url: Option, @@ -545,10 +549,9 @@ fn main() -> Result<()> { return benchmark(specs, runs.max(1)); } - let url = args - .url - .as_deref() - .ok_or_else(|| anyhow!("--url is required (e.g. stratum+tcp://host:port)"))?; + // Pool URL defaults to the jackpot.tools ZCL pool when not given on the CLI + // or in a config file. + let url = args.url.as_deref().unwrap_or(DEFAULT_POOL_URL); let (host, port) = parse_url(url, args.port)?; // Password = pool mode. --solo / --jackpot take precedence; otherwise