Browse Source

pool_check_coinbase: Avoid redisabling an already misbehaving pool

Luke Dashjr 11 years ago
parent
commit
49272507e5
1 changed files with 5 additions and 2 deletions
  1. 5 2
      miner.c

+ 5 - 2
miner.c

@@ -2942,8 +2942,11 @@ void pool_check_coinbase(struct pool * const pool, const uint8_t * const cbtxn,
 {
 	if (!check_coinbase(cbtxn, cbtxnsz, &pool->cb_param))
 	{
-		applog(LOG_ERR, "Pool %d misbehaving (%s), disabling!", pool->pool_no, "coinbase check");
-		disable_pool(pool, POOL_MISBEHAVING);
+		if (pool->enabled == POOL_ENABLED)
+		{
+			applog(LOG_ERR, "Pool %d misbehaving (%s), disabling!", pool->pool_no, "coinbase check");
+			disable_pool(pool, POOL_MISBEHAVING);
+		}
 	}
 	else
 	if (pool->enabled == POOL_MISBEHAVING)