Browse Source

replaced algo gostd by gostcoin

2upstream
orignal 6 years ago
parent
commit
be64645394
  1. 4
      algos.h
  2. 9
      ccminer.cpp

4
algos.h

@ -20,6 +20,7 @@ enum sha_algos {
ALGO_FRESH, ALGO_FRESH,
ALGO_FUGUE256, /* Fugue256 */ ALGO_FUGUE256, /* Fugue256 */
ALGO_GOSTD, ALGO_GOSTD,
ALGO_GOSTCOIN,
ALGO_GROESTL, ALGO_GROESTL,
ALGO_HEAVY, /* Heavycoin hash */ ALGO_HEAVY, /* Heavycoin hash */
ALGO_HMQ1725, ALGO_HMQ1725,
@ -93,6 +94,7 @@ static const char *algo_names[] = {
"fresh", "fresh",
"fugue256", "fugue256",
"gostd", "gostd",
"gostcoin",
"groestl", "groestl",
"heavy", "heavy",
"hmq1725", "hmq1725",
@ -189,6 +191,8 @@ static inline int algo_to_int(char* arg)
i = ALGO_SHA256D; i = ALGO_SHA256D;
else if (!strcasecmp("sha256", arg)) else if (!strcasecmp("sha256", arg))
i = ALGO_SHA256D; i = ALGO_SHA256D;
else if (!strcasecmp("gostcoin", arg))
i = ALGO_GOSTCOIN;
else if (!strcasecmp("gost", arg)) else if (!strcasecmp("gost", arg))
i = ALGO_GOSTD; i = ALGO_GOSTD;
else if (!strcasecmp("thorsriddle", arg)) else if (!strcasecmp("thorsriddle", arg))

9
ccminer.cpp

@ -251,7 +251,8 @@ Options:\n\
dmd-gr Diamond-Groestl\n\ dmd-gr Diamond-Groestl\n\
fresh Freshcoin (shavite 80)\n\ fresh Freshcoin (shavite 80)\n\
fugue256 Fuguecoin\n\ fugue256 Fuguecoin\n\
gostd GOSTd (GOSTcoin)\n\ gostcoin GOSTcoin\n\
gostd Double GOST R 34.11\n\
groestl Groestlcoin\n" groestl Groestlcoin\n"
#ifdef WITH_HEAVY_ALGO #ifdef WITH_HEAVY_ALGO
" heavy Heavycoin\n" " heavy Heavycoin\n"
@ -1571,7 +1572,7 @@ 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: case ALGO_GOSTCOIN:
gostd(merkle_root, sctx->job.coinbase, (int)sctx->job.coinbase_size); gostd(merkle_root, sctx->job.coinbase, (int)sctx->job.coinbase_size);
break; break;
case ALGO_WHIRLPOOL: case ALGO_WHIRLPOOL:
@ -1581,7 +1582,7 @@ static bool stratum_gen_work(struct stratum_ctx *sctx, struct work *work)
for (i = 0; i < sctx->job.merkle_count; i++) { for (i = 0; i < sctx->job.merkle_count; i++) {
memcpy(merkle_root + 32, sctx->job.merkle[i], 32); memcpy(merkle_root + 32, sctx->job.merkle[i], 32);
if (opt_algo == ALGO_GOSTD) if (opt_algo == ALGO_GOSTCOIN)
{ {
memcpy(merkle_root + 32, merkle_root, 32); memcpy(merkle_root + 32, merkle_root, 32);
gostd(merkle_root, merkle_root, 64); gostd(merkle_root, merkle_root, 64);
@ -2262,6 +2263,7 @@ static void *miner_thread(void *userdata)
case ALGO_X13: case ALGO_X13:
case ALGO_WHIRLCOIN: case ALGO_WHIRLCOIN:
case ALGO_WHIRLPOOL: case ALGO_WHIRLPOOL:
case ALGO_GOSTCOIN:
case ALGO_GOSTD: case ALGO_GOSTD:
minmax = 0x400000; minmax = 0x400000;
break; break;
@ -2472,6 +2474,7 @@ static void *miner_thread(void *userdata)
case ALGO_SIB: case ALGO_SIB:
rc = scanhash_sib(thr_id, &work, max_nonce, &hashes_done); rc = scanhash_sib(thr_id, &work, max_nonce, &hashes_done);
break; break;
case ALGO_GOSTCOIN:
case ALGO_GOSTD: case ALGO_GOSTD:
rc = scanhash_gostd(thr_id, &work, max_nonce, &hashes_done); rc = scanhash_gostd(thr_id, &work, max_nonce, &hashes_done);
break; break;

Loading…
Cancel
Save