From 42789f1a0dfba610a57a195f03f69a65cfa565b2 Mon Sep 17 00:00:00 2001 From: Tanguy Pruvot Date: Wed, 7 Oct 2015 02:22:18 +0000 Subject: [PATCH] whirlpool: allow stratum compat with new coins make a difference between whirlpool and whirlcoin algos (stratum) Look like the old SHA merkleroot method doesnt work on recent coins Doesn't affect solo mining, only pools using stratum+tcp:// protocol --- ccminer.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ccminer.cpp b/ccminer.cpp index 68e60c1..1b4ac47 100644 --- a/ccminer.cpp +++ b/ccminer.cpp @@ -117,6 +117,7 @@ enum sha_algos { ALGO_X15, ALGO_X17, ALGO_WHIRLCOIN, + ALGO_WHIRLPOOL, ALGO_WHIRLPOOLX, ALGO_ZR5, ALGO_COUNT @@ -155,6 +156,7 @@ static const char *algo_names[] = { "x14", "x15", "x17", + "whirlcoin", "whirlpool", "whirlpoolx", "zr5", @@ -1378,6 +1380,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_WHIRLPOOL: default: sha256d(merkle_root, sctx->job.coinbase, (int)sctx->job.coinbase_size); } @@ -1813,6 +1816,7 @@ static void *miner_thread(void *userdata) case ALGO_X11: case ALGO_X13: case ALGO_WHIRLCOIN: + case ALGO_WHIRLPOOL: minmax = 0x400000; break; case ALGO_LYRA2: @@ -1945,6 +1949,7 @@ static void *miner_thread(void *userdata) rc = scanhash_s3(thr_id, &work, max_nonce, &hashes_done); break; case ALGO_WHIRLCOIN: + case ALGO_WHIRLPOOL: rc = scanhash_whirl(thr_id, &work, max_nonce, &hashes_done); break; case ALGO_WHIRLPOOLX: @@ -2454,7 +2459,7 @@ void parse_arg(int key, char *arg) else if (!strcasecmp("lyra2rev2", arg)) i = opt_algo = ALGO_LYRA2v2; else if (!strcasecmp("whirl", arg)) - i = opt_algo = ALGO_WHIRLCOIN; + i = opt_algo = ALGO_WHIRLPOOL; else if (!strcasecmp("ziftr", arg)) i = opt_algo = ALGO_ZR5; else