mirror of
https://github.com/GOSTSec/sgminer
synced 2025-08-26 13:52:02 +00:00
Added --pool-priority
This commit is contained in:
parent
1f7b7ef26e
commit
8db53026cb
16
sgminer.c
16
sgminer.c
@ -931,6 +931,19 @@ static char *set_userpass(const char *arg)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static char *set_pool_priority(char *arg)
|
||||||
|
{
|
||||||
|
struct pool *pool;
|
||||||
|
|
||||||
|
while ((json_array_index + 1) > total_pools)
|
||||||
|
add_pool();
|
||||||
|
pool = pools[json_array_index];
|
||||||
|
applog(LOG_DEBUG, "Setting pool %i priority to %s", pool->pool_no, arg);
|
||||||
|
opt_set_intval(arg, &pool->prio);
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
static char *enable_debug(bool *flag)
|
static char *enable_debug(bool *flag)
|
||||||
{
|
{
|
||||||
*flag = true;
|
*flag = true;
|
||||||
@ -1400,6 +1413,9 @@ static struct opt_table opt_config_table[] = {
|
|||||||
OPT_WITH_ARG("--userpass|-O",
|
OPT_WITH_ARG("--userpass|-O",
|
||||||
set_userpass, NULL, NULL,
|
set_userpass, NULL, NULL,
|
||||||
"Username:Password pair for bitcoin JSON-RPC server"),
|
"Username:Password pair for bitcoin JSON-RPC server"),
|
||||||
|
OPT_WITH_ARG("--pool-priority",
|
||||||
|
set_pool_priority, NULL, NULL,
|
||||||
|
"Pool priority"),
|
||||||
OPT_WITHOUT_ARG("--worktime",
|
OPT_WITHOUT_ARG("--worktime",
|
||||||
opt_set_bool, &opt_worktime,
|
opt_set_bool, &opt_worktime,
|
||||||
"Display extra work time debug information"),
|
"Display extra work time debug information"),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user