Browse Source

Display quota and allow it to be modified via the pool menu.

nfactor-troky
Con Kolivas 11 years ago
parent
commit
7d2c31e28a
  1. 19
      cgminer.c

19
cgminer.c

@ -4420,8 +4420,9 @@ updated:
wlogprint("Rejecting "); wlogprint("Rejecting ");
break; break;
} }
wlogprint("%s Priority %d: %s User:%s\n", wlogprint("%s Quota %d Prio %d: %s User:%s\n",
pool->idle? "Dead" : "Alive", pool->idle? "Dead" : "Alive",
pool->quota,
pool->prio, pool->prio,
pool->rpc_url, pool->rpc_user); pool->rpc_url, pool->rpc_user);
wattroff(logwin, A_BOLD | A_DIM); wattroff(logwin, A_BOLD | A_DIM);
@ -4432,7 +4433,7 @@ retry:
if (pool_strategy == POOL_ROTATE) if (pool_strategy == POOL_ROTATE)
wlogprint("Set to rotate every %d minutes\n", opt_rotate_period); wlogprint("Set to rotate every %d minutes\n", opt_rotate_period);
wlogprint("[F]ailover only %s\n", opt_fail_only ? "enabled" : "disabled"); 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("[C]hange management strategy [S]witch pool [I]nformation\n");
wlogprint("Or press any other key to continue\n"); wlogprint("Or press any other key to continue\n");
logwin_update(); logwin_update();
@ -4526,6 +4527,20 @@ retry:
pool = pools[selected]; pool = pools[selected];
display_pool_summary(pool); display_pool_summary(pool);
goto retry; 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)) { } else if (!strncasecmp(&input, "f", 1)) {
opt_fail_only ^= true; opt_fail_only ^= true;
goto updated; goto updated;

Loading…
Cancel
Save