From 7d2c31e28a78bd73d0055ded5e30912f70f4602e Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Sat, 7 Sep 2013 19:01:13 +1000 Subject: [PATCH] Display quota and allow it to be modified via the pool menu. --- cgminer.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/cgminer.c b/cgminer.c index 25cfd172..fe56d61c 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;