mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-22 20:44:19 +00:00
Display quota and allow it to be modified via the pool menu.
This commit is contained in:
parent
e40f7af3c2
commit
7d2c31e28a
19
cgminer.c
19
cgminer.c
@ -4420,8 +4420,9 @@ updated:
|
||||
wlogprint("Rejecting ");
|
||||
break;
|
||||
}
|
||||
wlogprint("%s Priority %d: %s User:%s\n",
|
||||
wlogprint("%s Quota %d Prio %d: %s User:%s\n",
|
||||
pool->idle? "Dead" : "Alive",
|
||||
pool->quota,
|
||||
pool->prio,
|
||||
pool->rpc_url, pool->rpc_user);
|
||||
wattroff(logwin, A_BOLD | A_DIM);
|
||||
@ -4432,7 +4433,7 @@ retry:
|
||||
if (pool_strategy == POOL_ROTATE)
|
||||
wlogprint("Set to rotate every %d minutes\n", opt_rotate_period);
|
||||
wlogprint("[F]ailover only %s\n", opt_fail_only ? "enabled" : "disabled");
|
||||
wlogprint("[A]dd pool [R]emove pool [D]isable pool [E]nable pool\n");
|
||||
wlogprint("Pool [A]dd [R]emove [D]isable [E]nable [Q]uota change\n");
|
||||
wlogprint("[C]hange management strategy [S]witch pool [I]nformation\n");
|
||||
wlogprint("Or press any other key to continue\n");
|
||||
logwin_update();
|
||||
@ -4526,6 +4527,20 @@ retry:
|
||||
pool = pools[selected];
|
||||
display_pool_summary(pool);
|
||||
goto retry;
|
||||
} else if (!strncasecmp(&input, "q", 1)) {
|
||||
selected = curses_int("Select pool number");
|
||||
if (selected < 0 || selected >= total_pools) {
|
||||
wlogprint("Invalid selection\n");
|
||||
goto retry;
|
||||
}
|
||||
pool = pools[selected];
|
||||
selected = curses_int("Set quota");
|
||||
if (selected < 0) {
|
||||
wlogprint("Invalid negative quota\n");
|
||||
goto retry;
|
||||
}
|
||||
pool->quota = selected;
|
||||
goto updated;
|
||||
} else if (!strncasecmp(&input, "f", 1)) {
|
||||
opt_fail_only ^= true;
|
||||
goto updated;
|
||||
|
Loading…
x
Reference in New Issue
Block a user