From 41acd23d0fa82af7000890367d299571f8e476bb Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Sat, 29 Sep 2012 23:59:55 +1000 Subject: [PATCH] Extranonce2 should be added before coinbase2. --- cgminer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cgminer.c b/cgminer.c index f0d2e0ee..fd61053d 100644 --- a/cgminer.c +++ b/cgminer.c @@ -4357,8 +4357,8 @@ static void gen_stratum_work(struct pool *pool, struct work *work) coinbase = alloca(len); hex2bin(coinbase, pool->swork.coinbase1, cb1_len); hex2bin(coinbase + cb1_len, pool->nonce1, n1_len); - hex2bin(coinbase + cb1_len + n1_len, pool->swork.coinbase2, cb2_len); - hex2bin(coinbase + cb1_len + n1_len + cb2_len, nonce2, pool->n2size); + hex2bin(coinbase + cb1_len + n1_len, nonce2, pool->n2size); + hex2bin(coinbase + cb1_len + n1_len + pool->n2size, pool->swork.coinbase2, cb2_len); /* Generate merkle root */ gen_hash(coinbase, merkle_root, len);