mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-10 23:08:07 +00:00
config: allow specifying per-pool algorithm with --algorithm
instead of --pool-algorithm
.
This will probably only work with config file, though, since it relies on json_array_index.
This commit is contained in:
parent
53a199a21d
commit
f6616aa63b
18
sgminer.c
18
sgminer.c
@ -1062,17 +1062,25 @@ static void load_temp_cutoffs()
|
||||
|
||||
static char *set_algo(const char *arg)
|
||||
{
|
||||
set_algorithm(opt_algorithm, arg);
|
||||
applog(LOG_INFO, "Set default algorithm to %s", opt_algorithm->name);
|
||||
if (json_array_index < 0) {
|
||||
set_algorithm(opt_algorithm, arg);
|
||||
applog(LOG_INFO, "Set default algorithm to %s", opt_algorithm->name);
|
||||
} else {
|
||||
set_pool_algorithm(arg);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static char *set_nfactor(const char *arg)
|
||||
{
|
||||
set_algorithm_nfactor(opt_algorithm, (const uint8_t) atoi(arg));
|
||||
applog(LOG_INFO, "Set algorithm N-factor to %d (N to %d)",
|
||||
opt_algorithm->nfactor, opt_algorithm->n);
|
||||
if (json_array_index < 0) {
|
||||
set_algorithm_nfactor(opt_algorithm, (const uint8_t) atoi(arg));
|
||||
applog(LOG_INFO, "Set algorithm N-factor to %d (N to %d)",
|
||||
opt_algorithm->nfactor, opt_algorithm->n);
|
||||
} else {
|
||||
set_pool_nfactor(arg);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user