mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-22 20:44:19 +00:00
Added --coin pool parameter.
This commit is contained in:
parent
17f5e296a9
commit
bcb78ed91b
1
api.c
1
api.c
@ -1819,6 +1819,7 @@ static void poolstatus(struct io_data *io_data, __maybe_unused SOCKETTYPE c, __m
|
|||||||
|
|
||||||
root = api_add_int(root, "POOL", &i, false);
|
root = api_add_int(root, "POOL", &i, false);
|
||||||
root = api_add_string(root, "Name", pool->name, false);
|
root = api_add_string(root, "Name", pool->name, false);
|
||||||
|
root = api_add_string(root, "Coin", pool->coin, false);
|
||||||
root = api_add_escape(root, "URL", pool->rpc_url, false);
|
root = api_add_escape(root, "URL", pool->rpc_url, false);
|
||||||
root = api_add_string(root, "Status", status, false);
|
root = api_add_string(root, "Status", status, false);
|
||||||
root = api_add_int(root, "Priority", &(pool->prio), false);
|
root = api_add_int(root, "Priority", &(pool->prio), false);
|
||||||
|
1
miner.h
1
miner.h
@ -1172,6 +1172,7 @@ struct stratum_work {
|
|||||||
struct pool {
|
struct pool {
|
||||||
int pool_no;
|
int pool_no;
|
||||||
char *name;
|
char *name;
|
||||||
|
char *coin;
|
||||||
int prio;
|
int prio;
|
||||||
int accepted, rejected;
|
int accepted, rejected;
|
||||||
int seq_rejects;
|
int seq_rejects;
|
||||||
|
15
sgminer.c
15
sgminer.c
@ -554,6 +554,8 @@ struct pool *add_pool(void)
|
|||||||
pool->quota = 1;
|
pool->quota = 1;
|
||||||
adjust_quota_gcd();
|
adjust_quota_gcd();
|
||||||
|
|
||||||
|
pool->coin = "";
|
||||||
|
|
||||||
return pool;
|
return pool;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -925,6 +927,16 @@ static char *set_pool_priority(char *arg)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static char *set_pool_coin(char *arg)
|
||||||
|
{
|
||||||
|
struct pool *pool = get_current_pool();
|
||||||
|
|
||||||
|
applog(LOG_DEBUG, "Setting pool %i coin to %s", pool->pool_no, arg);
|
||||||
|
opt_set_charp(arg, &pool->coin);
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
static char *enable_debug(bool *flag)
|
static char *enable_debug(bool *flag)
|
||||||
{
|
{
|
||||||
*flag = true;
|
*flag = true;
|
||||||
@ -1397,6 +1409,9 @@ static struct opt_table opt_config_table[] = {
|
|||||||
OPT_WITH_ARG("--pool-priority",
|
OPT_WITH_ARG("--pool-priority",
|
||||||
set_pool_priority, NULL, NULL,
|
set_pool_priority, NULL, NULL,
|
||||||
"Pool priority"),
|
"Pool priority"),
|
||||||
|
OPT_WITH_ARG("--coin",
|
||||||
|
set_pool_coin, NULL, NULL,
|
||||||
|
"Pool coin"),
|
||||||
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