Browse Source

whirl: add missing merkle for some pools

master
Tanguy Pruvot 10 years ago
parent
commit
5cf024cc5d
  1. 2
      cpu-miner.c
  2. 4
      x15/cuda_x15_whirlpool.cu

2
cpu-miner.c

@ -737,7 +737,7 @@ static void stratum_gen_work(struct stratum_ctx *sctx, struct work *work) @@ -737,7 +737,7 @@ static void stratum_gen_work(struct stratum_ctx *sctx, struct work *work)
if (opt_algo == ALGO_HEAVY || opt_algo == ALGO_MJOLLNIR)
heavycoin_hash(merkle_root, sctx->job.coinbase, (int)sctx->job.coinbase_size);
else
if (opt_algo == ALGO_FUGUE256 || opt_algo == ALGO_GROESTL)
if (opt_algo == ALGO_FUGUE256 || opt_algo == ALGO_GROESTL || opt_algo == ALGO_WHC)
SHA256((unsigned char*)sctx->job.coinbase, sctx->job.coinbase_size, (unsigned char*)merkle_root);
else
sha256d(merkle_root, sctx->job.coinbase, (int)sctx->job.coinbase_size);

4
x15/cuda_x15_whirlpool.cu

@ -2317,7 +2317,7 @@ void whirlpool512_gpu_hash_80(int threads, uint32_t startNounce, void *outputHas @@ -2317,7 +2317,7 @@ void whirlpool512_gpu_hash_80(int threads, uint32_t startNounce, void *outputHas
for (int i=0; i<8; i++) {
n[i] = c_PaddedMessage80[i]; // read data
h[i] = 0; // read state
n[i] = xor1(n[i], h[i]);
//n[i] = xor1(n[i], h[i]);
}
#pragma unroll 10
@ -2398,7 +2398,7 @@ void whirlpool512_gpu_hash_64(int threads, uint32_t startNounce, uint64_t *g_has @@ -2398,7 +2398,7 @@ void whirlpool512_gpu_hash_64(int threads, uint32_t startNounce, uint64_t *g_has
{
uint32_t nounce = (g_nonceVector != NULL) ? g_nonceVector[thread] : (startNounce + thread);
uint32_t hashPosition = (nounce - startNounce) << 3;
uint64_t hash[8], state[8], n[8], h[8] = {0,0,0,0, 0,0,0,0};
uint64_t hash[8], state[8], n[8], h[8] = { 0 };
uint8_t i;
#pragma unroll 8

Loading…
Cancel
Save