Browse Source

Merge branch 'poolinfo' into bfgminer

Luke Dashjr 11 years ago
parent
commit
ec94897115
1 changed files with 10 additions and 0 deletions
  1. 10 0
      miner.c

+ 10 - 0
miner.c

@@ -3965,6 +3965,8 @@ static void curses_print_status(const int ts)
 				oldest_work_restart_pool = pool;
 			}
 		}
+		if (unlikely(!workable_pools))
+			goto no_workable_pools;
 		if (workable_pools == 1)
 			goto one_workable_pool;
 		poolinfo2off = snprintf(poolinfo2, sizeof(poolinfo2), "%u (", workable_pools);
@@ -3981,6 +3983,14 @@ static void curses_print_status(const int ts)
 		             oldest_work_restart_pool->work_restart_timestamp);
 	}
 	else
+	if (pool_unworkable(pool))
+	{
+no_workable_pools: ;
+		wattron(statuswin, attr_bad);
+		cg_mvwprintw(statuswin, 2, 0, " (all pools are dead) ");
+		wattroff(statuswin, attr_bad);
+	}
+	else
 	{
 one_workable_pool: ;
 		char pooladdr[19];