Default the pool to zcl.jackpot.tools:3333
When neither --url nor a config file specifies a pool, fall back to stratum+tcp://zcl.jackpot.tools:3333 instead of erroring. Resolution order is unchanged: --url flag → config-file url → built-in default. `url` stays an Option so config auto-discovery and the GUI terminal relaunch (which key off url.is_none()) are unaffected. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -240,8 +240,9 @@ on clean shutdown**. The per-card stats line shows live `Sol/s`, board `W`, and
|
|||||||
./target/release/jackpotminer --selftest
|
./target/release/jackpotminer --selftest
|
||||||
```
|
```
|
||||||
|
|
||||||
Key flags: `--url`, `--port` (fallback when the URL omits one), `--user` (`-u`),
|
Key flags: `--url` (defaults to `stratum+tcp://zcl.jackpot.tools:3333` when
|
||||||
`--pass` (`-p`), `--backend` (`opencl`/`cuda`), `--devices` (e.g. `0,1` or `all`),
|
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`,
|
`--device` (`-d`, for single-device benchmark/debug), `--threads` (`-t`), `--cpu`,
|
||||||
`--benchmark N`, `--list-devices`, `--selftest`. When mining in a terminal a live
|
`--benchmark N`, `--list-devices`, `--selftest`. When mining in a terminal a live
|
||||||
ratatui **dashboard** is shown by default (per-card Sol/s, power, temperature,
|
ratatui **dashboard** is shown by default (per-card Sol/s, power, temperature,
|
||||||
|
|||||||
+2
-1
@@ -12,7 +12,8 @@
|
|||||||
# jackpotminer --config mine.toml
|
# jackpotminer --config mine.toml
|
||||||
|
|
||||||
# ── Pool (required) ───────────────────────────────────────────────────────────
|
# ── 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
|
user = "t1YourZClassicAddressHere.rig1" # payout address / worker login
|
||||||
# port = 3032 # only if `url` has no ":port"
|
# port = 3032 # only if `url` has no ":port"
|
||||||
|
|
||||||
|
|||||||
+8
-5
@@ -42,6 +42,9 @@ use log::{info, warn};
|
|||||||
use crate::miner::BackendSpec;
|
use crate::miner::BackendSpec;
|
||||||
use crate::stratum::StratumClient;
|
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.
|
/// Command-line options.
|
||||||
#[derive(Parser, Debug)]
|
#[derive(Parser, Debug)]
|
||||||
#[command(name = "jackpotminer", version, about = "equihash 192,7 miner")]
|
#[command(name = "jackpotminer", version, about = "equihash 192,7 miner")]
|
||||||
@@ -53,7 +56,8 @@ struct Args {
|
|||||||
#[arg(long, value_name = "FILE")]
|
#[arg(long, value_name = "FILE")]
|
||||||
config: Option<String>,
|
config: Option<String>,
|
||||||
|
|
||||||
/// 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)]
|
#[arg(long)]
|
||||||
url: Option<String>,
|
url: Option<String>,
|
||||||
|
|
||||||
@@ -545,10 +549,9 @@ fn main() -> Result<()> {
|
|||||||
return benchmark(specs, runs.max(1));
|
return benchmark(specs, runs.max(1));
|
||||||
}
|
}
|
||||||
|
|
||||||
let url = args
|
// Pool URL defaults to the jackpot.tools ZCL pool when not given on the CLI
|
||||||
.url
|
// or in a config file.
|
||||||
.as_deref()
|
let url = args.url.as_deref().unwrap_or(DEFAULT_POOL_URL);
|
||||||
.ok_or_else(|| anyhow!("--url is required (e.g. stratum+tcp://host:port)"))?;
|
|
||||||
let (host, port) = parse_url(url, args.port)?;
|
let (host, port) = parse_url(url, args.port)?;
|
||||||
|
|
||||||
// Password = pool mode. --solo / --jackpot <pct> take precedence; otherwise
|
// Password = pool mode. --solo / --jackpot <pct> take precedence; otherwise
|
||||||
|
|||||||
Reference in New Issue
Block a user