Skip to content

Commit

Permalink
Add keccakc for creative coin
Browse files Browse the repository at this point in the history
Same hash as keccak, just different pool settings (sha256d and diff factor 256)
  • Loading branch information
tpruvot committed Dec 3, 2017
1 parent df4fcbe commit d19e2a1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions algos.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -92,6 +93,7 @@ static const char *algo_names[] = {
"hmq1725",
"hsr",
"keccak",
"keccakc",
"jackpot",
"jha",
"lbry",
Expand Down Expand Up @@ -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))
Expand Down
3 changes: 1 addition & 2 deletions bench.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,21 +126,20 @@ 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++;

if (device_sm[dev_id] && device_sm[dev_id] < 300) {
// 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++;
}
Expand Down
3 changes: 3 additions & 0 deletions ccminer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit d19e2a1

Please sign in to comment.