From d62483fbd2691341e9d30f17ba48317f012e44cf Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Fri, 13 Feb 2015 09:25:42 +1100 Subject: [PATCH] Workbases always exists by the time we reach the point we can set the enonce2varlen --- src/stratifier.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/stratifier.c b/src/stratifier.c index 401e201f..a8bc5774 100644 --- a/src/stratifier.c +++ b/src/stratifier.c @@ -2241,11 +2241,9 @@ static json_t *parse_subscribe(stratum_instance_t *client, const int64_t client_ client->id, client->enonce1_64, client->enonce1); } + /* Workbases will exist if sdata->current_workbase is not NULL */ ck_rlock(&sdata->workbase_lock); - if (likely(sdata->workbases)) - n2len = sdata->workbases->enonce2varlen; - else - n2len = 8; + n2len = sdata->workbases->enonce2varlen; JSON_CPACK(ret, "[[[s,s]],s,i]", "mining.notify", client->enonce1, client->enonce1, n2len); ck_runlock(&sdata->workbase_lock);