Display quota and allow it to be modified via the pool menu.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
diff --git a/cgminer.c b/cgminer.c
index 25cfd17..fe56d61 100644
--- a/cgminer.c
+++ b/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;