Browse Source

Add keccakc for creative coin

Same hash as keccak, just different pool settings (sha256d and diff factor 256)
pull/2/head
Tanguy Pruvot 7 years ago
parent
commit
d19e2a1e62
  1. 4
      algos.h
  2. 3
      bench.cpp
  3. 3
      ccminer.cpp

4
algos.h

@ -24,6 +24,7 @@ enum sha_algos { @@ -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[] = { @@ -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) @@ -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))

3
bench.cpp

@ -126,13 +126,13 @@ bool bench_algo_switch_next(int thr_id) @@ -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) @@ -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++;
}

3
ccminer.cpp

@ -1695,6 +1695,7 @@ static bool stratum_gen_work(struct stratum_ctx *sctx, struct work *work) @@ -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) @@ -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) @@ -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;

Loading…
Cancel
Save