From e7bca3194177e5ba799a963dd360effef3041474 Mon Sep 17 00:00:00 2001 From: elbandi Date: Sat, 26 Apr 2014 01:17:14 +0200 Subject: [PATCH] Some tweaks for extranonce --- sgminer.c | 9 --------- util.c | 6 ++---- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/sgminer.c b/sgminer.c index 4b3bf7cf..e3854ad3 100644 --- a/sgminer.c +++ b/sgminer.c @@ -5208,15 +5208,6 @@ static bool parse_stratum_response(struct pool *pool, char *s) id = json_integer_value(id_val); - if (err_val && !json_is_null(err_val)) { - char *ss; - ss = (char *)json_string_value(json_array_get(err_val, 1)); - if (opt_extranonce_subscribe && strcmp(ss, "Method 'subscribe' not found for service 'mining.extranonce'") == 0) { - applog(LOG_INFO, "Cannot subscribe to mining.extranonce on %s", get_pool_name(pool)); - goto out; - } - } - mutex_lock(&sshare_lock); HASH_FIND_INT(stratum_shares, &id, sshare); if (sshare) { diff --git a/util.c b/util.c index 85557f13..692b92a2 100644 --- a/util.c +++ b/util.c @@ -1671,12 +1671,10 @@ static bool parse_extranonce(struct pool *pool, json_t *val) nonce1 = json_array_string(val, 0); if (!nonce1) { -// applog(LOG_INFO, "Failed to get nonce1 in "); return false; } n2size = json_integer_value(json_array_get(val, 1)); if (!n2size) { -// applog(LOG_INFO, "Failed to get n2size in "); free(nonce1); return false; } @@ -1692,7 +1690,7 @@ static bool parse_extranonce(struct pool *pool, json_t *val) pool->n2size = n2size; cg_wunlock(&pool->data_lock); - applog(LOG_NOTICE, "%s coin change requested", get_pool_name(pool)); + applog(LOG_NOTICE, "%s extranonce change requested", get_pool_name(pool)); return true; } @@ -1880,7 +1878,7 @@ bool subscribe_extranonce(struct pool *pool) if (!stratum_send(pool, s, strlen(s))) return ret; - /* Parse all data in the queue and anything left should be auth */ + /* Parse all data in the queue and anything left should be the response */ while (42) { if (!socket_full(pool, DEFAULT_SOCKWAIT / 30)) { applog(LOG_DEBUG, "Timed out waiting for response extranonce.subscribe");