From 1221a80d414cd0187ec1edffb00d9a410effd189 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Sat, 29 Sep 2012 01:03:23 +1000 Subject: [PATCH] Rename nonce2 to n2size reflecting that it's a size variable and not the actual nonce. --- miner.h | 2 +- util.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/miner.h b/miner.h index fc4ba8c5..79cf5509 100644 --- a/miner.h +++ b/miner.h @@ -837,7 +837,7 @@ struct pool { struct sockaddr_in *server, client; char *subscription; char *nonce1; - int nonce2; + int n2size; bool has_stratum; bool stratum_active; bool stratum_auth; diff --git a/util.c b/util.c index aa5c709d..de2ff196 100644 --- a/util.c +++ b/util.c @@ -1239,9 +1239,9 @@ bool initiate_stratum(struct pool *pool) applog(LOG_WARNING, "Failed to get nonce1 in initiate_stratum"); goto out; } - pool->nonce2 = json_integer_value(json_array_get(res_val, 2)); - if (!pool->nonce2) { - applog(LOG_WARNING, "Failed to get nonce2 in initiate_stratum"); + pool->n2size = json_integer_value(json_array_get(res_val, 2)); + if (!pool->n2size) { + applog(LOG_WARNING, "Failed to get n2size in initiate_stratum"); goto out; } @@ -1253,8 +1253,8 @@ out: if (ret) { pool->stratum_active = true; if (opt_protocol) { - applog(LOG_DEBUG, "Pool %d confirmed mining.notify with subscription %s extranonce1 %s extranonce2 %d", - pool->pool_no, pool->subscription, pool->nonce1, pool->nonce2); + applog(LOG_DEBUG, "Pool %d confirmed mining.notify with subscription %s extranonce1 %s extran2size %d", + pool->pool_no, pool->subscription, pool->nonce1, pool->n2size); } } else CLOSESOCKET(pool->sock);