From 0379123bc124e3aad4d8cef60ece7e120df404c7 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Mon, 12 Aug 2013 15:23:35 +1000 Subject: [PATCH] Avoid one more hex2bin in gen stratum work. --- cgminer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cgminer.c b/cgminer.c index 85d44e89..d2d59655 100644 --- a/cgminer.c +++ b/cgminer.c @@ -5593,9 +5593,9 @@ static void gen_stratum_work(struct pool *pool, struct work *work) cg_wlock(&pool->data_lock); - /* Generate coinbase */ + /* Update coinbase */ + memcpy(pool->coinbase + pool->nonce2_offset, &pool->nonce2, pool->n2size); work->nonce2 = bin2hex((const unsigned char *)&pool->nonce2, pool->n2size); - hex2bin(pool->coinbase + pool->nonce2_offset, work->nonce2, pool->n2size); pool->nonce2++; /* Downgrade to a read lock to read off the pool variables */