|
|
@ -1671,12 +1671,10 @@ static bool parse_extranonce(struct pool *pool, json_t *val) |
|
|
|
|
|
|
|
|
|
|
|
nonce1 = json_array_string(val, 0); |
|
|
|
nonce1 = json_array_string(val, 0); |
|
|
|
if (!nonce1) { |
|
|
|
if (!nonce1) { |
|
|
|
// applog(LOG_INFO, "Failed to get nonce1 in ");
|
|
|
|
|
|
|
|
return false; |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
n2size = json_integer_value(json_array_get(val, 1)); |
|
|
|
n2size = json_integer_value(json_array_get(val, 1)); |
|
|
|
if (!n2size) { |
|
|
|
if (!n2size) { |
|
|
|
// applog(LOG_INFO, "Failed to get n2size in ");
|
|
|
|
|
|
|
|
free(nonce1); |
|
|
|
free(nonce1); |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
@ -1692,7 +1690,7 @@ static bool parse_extranonce(struct pool *pool, json_t *val) |
|
|
|
pool->n2size = n2size; |
|
|
|
pool->n2size = n2size; |
|
|
|
cg_wunlock(&pool->data_lock); |
|
|
|
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; |
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
@ -1880,7 +1878,7 @@ bool subscribe_extranonce(struct pool *pool) |
|
|
|
if (!stratum_send(pool, s, strlen(s))) |
|
|
|
if (!stratum_send(pool, s, strlen(s))) |
|
|
|
return ret; |
|
|
|
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) { |
|
|
|
while (42) { |
|
|
|
if (!socket_full(pool, DEFAULT_SOCKWAIT / 30)) { |
|
|
|
if (!socket_full(pool, DEFAULT_SOCKWAIT / 30)) { |
|
|
|
applog(LOG_DEBUG, "Timed out waiting for response extranonce.subscribe"); |
|
|
|
applog(LOG_DEBUG, "Timed out waiting for response extranonce.subscribe"); |
|
|
|