|
|
|
@ -1500,6 +1500,9 @@ static bool stratum_gen_work(struct stratum_ctx *sctx, struct work *work)
@@ -1500,6 +1500,9 @@ static bool stratum_gen_work(struct stratum_ctx *sctx, struct work *work)
|
|
|
|
|
case ALGO_WHIRLCOIN: |
|
|
|
|
SHA256((uchar*)sctx->job.coinbase, sctx->job.coinbase_size, (uchar*)merkle_root); |
|
|
|
|
break; |
|
|
|
|
case ALGO_GOSTD: |
|
|
|
|
gostd(merkle_root, sctx->job.coinbase, (int)sctx->job.coinbase_size); |
|
|
|
|
break; |
|
|
|
|
case ALGO_WHIRLPOOL: |
|
|
|
|
default: |
|
|
|
|
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)
@@ -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); |
|
|
|
|
if (opt_algo == ALGO_HEAVY || opt_algo == ALGO_MJOLLNIR) |
|
|
|
|
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 |
|
|
|
|
sha256d(merkle_root, merkle_root, 64); |
|
|
|
|
} |
|
|
|
|