From d19e2a1e620e1e3daad273c8f3f1c9231684ba00 Mon Sep 17 00:00:00 2001 From: Tanguy Pruvot Date: Sun, 3 Dec 2017 16:49:23 +0100 Subject: [PATCH] Add keccakc for creative coin Same hash as keccak, just different pool settings (sha256d and diff factor 256) --- algos.h | 4 ++-- bench.cpp | 3 +-- ccminer.cpp | 3 +++ 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/algos.h b/algos.h index 9109ad5..c77b5e8 100644 --- a/algos.h +++ b/algos.h @@ -24,6 +24,7 @@ enum sha_algos { ALGO_HMQ1725, ALGO_HSR, ALGO_KECCAK, + ALGO_KECCAKC, /* refreshed Keccak with pool factor 256 */ ALGO_JACKPOT, ALGO_JHA, ALGO_LBRY, @@ -92,6 +93,7 @@ static const char *algo_names[] = { "hmq1725", "hsr", "keccak", + "keccakc", "jackpot", "jha", "lbry", @@ -169,8 +171,6 @@ static inline int algo_to_int(char* arg) i = ALGO_HMQ1725; else if (!strcasecmp("hshare", arg)) i = ALGO_HSR; - //else if (!strcasecmp("jackpot", arg)) - // i = ALGO_JHA; else if (!strcasecmp("lyra2re", arg)) i = ALGO_LYRA2; else if (!strcasecmp("lyra2rev2", arg)) diff --git a/bench.cpp b/bench.cpp index 8aef239..dc670e7 100644 --- a/bench.cpp +++ b/bench.cpp @@ -126,13 +126,13 @@ bool bench_algo_switch_next(int thr_id) if (algo == ALGO_C11) algo++; // same as x11 if (algo == ALGO_DMD_GR) algo++; // same as groestl if (algo == ALGO_MJOLLNIR) algo++; // same as heavy + if (algo == ALGO_KECCAKC) algo++; // same as keccak if (algo == ALGO_WHIRLCOIN) algo++; // same as whirlpool if (algo == ALGO_WHIRLPOOLX) algo++; // disabled // todo: algo switch from RPC 2.0 if (algo == ALGO_CRYPTOLIGHT) algo++; if (algo == ALGO_CRYPTONIGHT) algo++; if (algo == ALGO_WILDKECCAK) algo++; - //if (algo == ALGO_JACKPOT) algo++; // to fix if (algo == ALGO_QUARK) algo++; // to fix if (algo == ALGO_LBRY && CUDART_VERSION < 7000) algo++; @@ -140,7 +140,6 @@ bool bench_algo_switch_next(int thr_id) // incompatible SM 2.1 kernels... if (algo == ALGO_GROESTL) algo++; if (algo == ALGO_MYR_GR) algo++; - //if (algo == ALGO_JACKPOT) algo++; // compact shuffle if (algo == ALGO_NEOSCRYPT) algo++; if (algo == ALGO_WHIRLPOOLX) algo++; } diff --git a/ccminer.cpp b/ccminer.cpp index 4da4b04..4208fd8 100644 --- a/ccminer.cpp +++ b/ccminer.cpp @@ -1695,6 +1695,7 @@ static bool stratum_gen_work(struct stratum_ctx *sctx, struct work *work) case ALGO_FRESH: case ALGO_FUGUE256: case ALGO_GROESTL: + case ALGO_KECCAKC: case ALGO_LBRY: case ALGO_LYRA2v2: case ALGO_LYRA2Z: @@ -2215,6 +2216,7 @@ static void *miner_thread(void *userdata) minmax = 0x40000000U; break; case ALGO_KECCAK: + case ALGO_KECCAKC: case ALGO_LBRY: case ALGO_LUFFA: case ALGO_SIA: @@ -2376,6 +2378,7 @@ static void *miner_thread(void *userdata) break; case ALGO_KECCAK: + case ALGO_KECCAKC: rc = scanhash_keccak256(thr_id, &work, max_nonce, &hashes_done); break;