|
|
@ -1500,6 +1500,9 @@ static bool stratum_gen_work(struct stratum_ctx *sctx, struct work *work) |
|
|
|
case ALGO_WHIRLCOIN: |
|
|
|
case ALGO_WHIRLCOIN: |
|
|
|
SHA256((uchar*)sctx->job.coinbase, sctx->job.coinbase_size, (uchar*)merkle_root); |
|
|
|
SHA256((uchar*)sctx->job.coinbase, sctx->job.coinbase_size, (uchar*)merkle_root); |
|
|
|
break; |
|
|
|
break; |
|
|
|
|
|
|
|
case ALGO_GOSTD: |
|
|
|
|
|
|
|
gostd(merkle_root, sctx->job.coinbase, (int)sctx->job.coinbase_size); |
|
|
|
|
|
|
|
break; |
|
|
|
case ALGO_WHIRLPOOL: |
|
|
|
case ALGO_WHIRLPOOL: |
|
|
|
default: |
|
|
|
default: |
|
|
|
sha256d(merkle_root, sctx->job.coinbase, (int)sctx->job.coinbase_size); |
|
|
|
sha256d(merkle_root, sctx->job.coinbase, (int)sctx->job.coinbase_size); |
|
|
@ -1509,6 +1512,11 @@ static bool stratum_gen_work(struct stratum_ctx *sctx, struct work *work) |
|
|
|
memcpy(merkle_root + 32, sctx->job.merkle[i], 32); |
|
|
|
memcpy(merkle_root + 32, sctx->job.merkle[i], 32); |
|
|
|
if (opt_algo == ALGO_HEAVY || opt_algo == ALGO_MJOLLNIR) |
|
|
|
if (opt_algo == ALGO_HEAVY || opt_algo == ALGO_MJOLLNIR) |
|
|
|
heavycoin_hash(merkle_root, merkle_root, 64); |
|
|
|
heavycoin_hash(merkle_root, merkle_root, 64); |
|
|
|
|
|
|
|
if (opt_algo == ALGO_GOSTD) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
memcpy(merkle_root + 32, merkle_root, 32); |
|
|
|
|
|
|
|
gostd(merkle_root, merkle_root, 64); |
|
|
|
|
|
|
|
} |
|
|
|
else |
|
|
|
else |
|
|
|
sha256d(merkle_root, merkle_root, 64); |
|
|
|
sha256d(merkle_root, merkle_root, 64); |
|
|
|
} |
|
|
|
} |
|
|
|