From be64645394977855ab4103133221f7742668b330 Mon Sep 17 00:00:00 2001 From: orignal Date: Wed, 23 May 2018 16:22:44 -0400 Subject: [PATCH] replaced algo gostd by gostcoin --- algos.h | 4 ++++ ccminer.cpp | 9 ++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/algos.h b/algos.h index f33cd6f..e553b7f 100644 --- a/algos.h +++ b/algos.h @@ -20,6 +20,7 @@ enum sha_algos { ALGO_FRESH, ALGO_FUGUE256, /* Fugue256 */ ALGO_GOSTD, + ALGO_GOSTCOIN, ALGO_GROESTL, ALGO_HEAVY, /* Heavycoin hash */ ALGO_HMQ1725, @@ -93,6 +94,7 @@ static const char *algo_names[] = { "fresh", "fugue256", "gostd", + "gostcoin", "groestl", "heavy", "hmq1725", @@ -189,6 +191,8 @@ static inline int algo_to_int(char* arg) i = ALGO_SHA256D; else if (!strcasecmp("sha256", arg)) i = ALGO_SHA256D; + else if (!strcasecmp("gostcoin", arg)) + i = ALGO_GOSTCOIN; else if (!strcasecmp("gost", arg)) i = ALGO_GOSTD; else if (!strcasecmp("thorsriddle", arg)) diff --git a/ccminer.cpp b/ccminer.cpp index 79bbb37..5c7cd51 100644 --- a/ccminer.cpp +++ b/ccminer.cpp @@ -251,7 +251,8 @@ Options:\n\ dmd-gr Diamond-Groestl\n\ fresh Freshcoin (shavite 80)\n\ fugue256 Fuguecoin\n\ - gostd GOSTd (GOSTcoin)\n\ + gostcoin GOSTcoin\n\ + gostd Double GOST R 34.11\n\ groestl Groestlcoin\n" #ifdef WITH_HEAVY_ALGO " heavy Heavycoin\n" @@ -1571,7 +1572,7 @@ 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: + case ALGO_GOSTCOIN: gostd(merkle_root, sctx->job.coinbase, (int)sctx->job.coinbase_size); break; 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++) { 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); gostd(merkle_root, merkle_root, 64); @@ -2262,6 +2263,7 @@ static void *miner_thread(void *userdata) case ALGO_X13: case ALGO_WHIRLCOIN: case ALGO_WHIRLPOOL: + case ALGO_GOSTCOIN: case ALGO_GOSTD: minmax = 0x400000; break; @@ -2472,6 +2474,7 @@ static void *miner_thread(void *userdata) case ALGO_SIB: rc = scanhash_sib(thr_id, &work, max_nonce, &hashes_done); break; + case ALGO_GOSTCOIN: case ALGO_GOSTD: rc = scanhash_gostd(thr_id, &work, max_nonce, &hashes_done); break;