Browse Source

fixed typo

pull/1/head
orignal 7 years ago
parent
commit
a3c4d628b8
  1. 8
      sgminer.c

8
sgminer.c

@ -2019,9 +2019,13 @@ static unsigned char *__gbt_merkleroot(struct pool *pool) @@ -2019,9 +2019,13 @@ static unsigned char *__gbt_merkleroot(struct pool *pool)
memcpy(&merkle_hash[txns * 32], &merkle_hash[(txns - 1) * 32], 32);
txns++;
}
for (i = 0; i < txns; i += 2){
for (i = 0; i < txns; i += 2)
{
unsigned char hashout[32];
if (pool->algorithm.type == ALGO_GOSTCOIN) // TODO: delete after hard fork1
memcpy (merkle_hash + (i+1)*32, merkle_hash + i*32, 32);
pool->algorithm.gen_hash(merkle_hash + (i * 32), 64, hashout);
memcpy(merkle_hash + (i / 2 * 32), hashout, 32);
}
@ -6152,7 +6156,7 @@ static void gen_stratum_work(struct pool *pool, struct work *work) @@ -6152,7 +6156,7 @@ static void gen_stratum_work(struct pool *pool, struct work *work)
memcpy(merkle_sha, merkle_root, 32);
for (i = 0; i < pool->swork.merkles; i++)
{
if (pool->algorithm.type != ALGO_GOSTCOIN) // TODO: remove after hard fork 1
if (pool->algorithm.type == ALGO_GOSTCOIN) // TODO: remove after hard fork 1
memcpy(merkle_sha + 32, merkle_sha, 32);
else
memcpy(merkle_sha + 32, pool->swork.merkle_bin[i], 32);

Loading…
Cancel
Save