|
|
@ -126,16 +126,16 @@ struct workio_cmd { |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
typedef enum { |
|
|
|
typedef enum { |
|
|
|
ALGO_HEAVY, /* Heavycoin hash */ |
|
|
|
ALGO_ANIME, |
|
|
|
ALGO_MJOLLNIR, /* Mjollnir hash */ |
|
|
|
ALGO_BLAKE, |
|
|
|
|
|
|
|
ALGO_FRESH, |
|
|
|
ALGO_FUGUE256, /* Fugue256 */ |
|
|
|
ALGO_FUGUE256, /* Fugue256 */ |
|
|
|
ALGO_GROESTL, |
|
|
|
ALGO_GROESTL, |
|
|
|
ALGO_MYR_GR, |
|
|
|
ALGO_HEAVY, /* Heavycoin hash */ |
|
|
|
ALGO_JACKPOT, |
|
|
|
ALGO_JACKPOT, |
|
|
|
|
|
|
|
ALGO_MJOLLNIR, /* Mjollnir hash */ |
|
|
|
|
|
|
|
ALGO_MYR_GR, |
|
|
|
ALGO_QUARK, |
|
|
|
ALGO_QUARK, |
|
|
|
ALGO_ANIME, |
|
|
|
|
|
|
|
ALGO_FRESH, |
|
|
|
|
|
|
|
ALGO_BLAKE, |
|
|
|
|
|
|
|
ALGO_NIST5, |
|
|
|
ALGO_NIST5, |
|
|
|
ALGO_WHC, |
|
|
|
ALGO_WHC, |
|
|
|
ALGO_X11, |
|
|
|
ALGO_X11, |
|
|
@ -147,17 +147,17 @@ typedef enum { |
|
|
|
} sha256_algos; |
|
|
|
} sha256_algos; |
|
|
|
|
|
|
|
|
|
|
|
static const char *algo_names[] = { |
|
|
|
static const char *algo_names[] = { |
|
|
|
"heavy", |
|
|
|
"anime", |
|
|
|
"mjollnir", |
|
|
|
"blake", |
|
|
|
|
|
|
|
"fresh", |
|
|
|
"fugue256", |
|
|
|
"fugue256", |
|
|
|
"groestl", |
|
|
|
"groestl", |
|
|
|
"myr-gr", |
|
|
|
"heavy", |
|
|
|
"jackpot", |
|
|
|
"jackpot", |
|
|
|
"quark", |
|
|
|
"mjollnir", |
|
|
|
"anime", |
|
|
|
"myr-gr", |
|
|
|
"fresh", |
|
|
|
|
|
|
|
"blake", |
|
|
|
|
|
|
|
"nist5", |
|
|
|
"nist5", |
|
|
|
|
|
|
|
"quark", |
|
|
|
"whirl", |
|
|
|
"whirl", |
|
|
|
"x11", |
|
|
|
"x11", |
|
|
|
"x13", |
|
|
|
"x13", |
|
|
@ -229,17 +229,17 @@ static char const usage[] = "\ |
|
|
|
Usage: " PROGRAM_NAME " [OPTIONS]\n\ |
|
|
|
Usage: " PROGRAM_NAME " [OPTIONS]\n\ |
|
|
|
Options:\n\ |
|
|
|
Options:\n\ |
|
|
|
-a, --algo=ALGO specify the algorithm to use\n\ |
|
|
|
-a, --algo=ALGO specify the algorithm to use\n\ |
|
|
|
|
|
|
|
anime Animecoin hash\n\ |
|
|
|
|
|
|
|
blake Blake 256 (like NEOS blake)\n\ |
|
|
|
|
|
|
|
fresh Freshcoin hash (shavite 80)\n\ |
|
|
|
fugue256 Fuguecoin hash\n\ |
|
|
|
fugue256 Fuguecoin hash\n\ |
|
|
|
|
|
|
|
groestl Groestlcoin hash\n\ |
|
|
|
heavy Heavycoin hash\n\ |
|
|
|
heavy Heavycoin hash\n\ |
|
|
|
|
|
|
|
jackpot Jackpot hash\n\ |
|
|
|
mjollnir Mjollnircoin hash\n\ |
|
|
|
mjollnir Mjollnircoin hash\n\ |
|
|
|
groestl Groestlcoin hash\n\ |
|
|
|
|
|
|
|
myr-gr Myriad-Groestl hash\n\ |
|
|
|
myr-gr Myriad-Groestl hash\n\ |
|
|
|
jackpot Jackpot hash\n\ |
|
|
|
|
|
|
|
quark Quark hash\n\ |
|
|
|
|
|
|
|
anime Animecoin hash\n\ |
|
|
|
|
|
|
|
blake Blake 256 (like NEOS blake)\n\ |
|
|
|
|
|
|
|
fresh Freshcoin hash (shavite 80)\n\ |
|
|
|
|
|
|
|
nist5 NIST5 (TalkCoin) hash\n\ |
|
|
|
nist5 NIST5 (TalkCoin) hash\n\ |
|
|
|
|
|
|
|
quark Quark hash\n\ |
|
|
|
whirl Whirlcoin (old whirlpool)\n\ |
|
|
|
whirl Whirlcoin (old whirlpool)\n\ |
|
|
|
x11 X11 (DarkCoin) hash\n\ |
|
|
|
x11 X11 (DarkCoin) hash\n\ |
|
|
|
x13 X13 (MaruCoin) hash\n\ |
|
|
|
x13 X13 (MaruCoin) hash\n\ |
|
|
@ -420,11 +420,11 @@ static void share_result(int result, const char *reason) |
|
|
|
100. * accepted_count / (accepted_count + rejected_count), |
|
|
|
100. * accepted_count / (accepted_count + rejected_count), |
|
|
|
s, |
|
|
|
s, |
|
|
|
use_colors ? |
|
|
|
use_colors ? |
|
|
|
(result ? CL_GRN "(yay!!!)" : CL_RED "(booooo)") |
|
|
|
(result ? CL_GRN "yay!!!" : CL_RED "booooo") |
|
|
|
: (result ? "(yay!!!)" : "(booooo)")); |
|
|
|
: (result ? "(yay!!!)" : "(booooo)")); |
|
|
|
|
|
|
|
|
|
|
|
if (opt_debug && reason) |
|
|
|
if (reason) |
|
|
|
applog(LOG_DEBUG, "DEBUG: reject reason: %s", reason); |
|
|
|
applog(LOG_WARNING, "reject reason: %s", reason); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static bool submit_upstream_work(CURL *curl, struct work *work) |
|
|
|
static bool submit_upstream_work(CURL *curl, struct work *work) |
|
|
@ -856,7 +856,7 @@ static void *miner_thread(void *userdata) |
|
|
|
if ((*nonceptr) >= end_nonce) |
|
|
|
if ((*nonceptr) >= end_nonce) |
|
|
|
stratum_gen_work(&stratum, &g_work); |
|
|
|
stratum_gen_work(&stratum, &g_work); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
int min_scantime = have_longpoll ? LP_SCANTIME : opt_scantime; |
|
|
|
int min_scantime = have_longpoll ? (LP_SCANTIME*3)/4 : opt_scantime; |
|
|
|
/* obtain new work from internal workio thread */ |
|
|
|
/* obtain new work from internal workio thread */ |
|
|
|
pthread_mutex_lock(&g_work_lock); |
|
|
|
pthread_mutex_lock(&g_work_lock); |
|
|
|
if (!have_stratum && |
|
|
|
if (!have_stratum && |
|
|
@ -952,13 +952,13 @@ static void *miner_thread(void *userdata) |
|
|
|
max_nonce, &hashes_done); |
|
|
|
max_nonce, &hashes_done); |
|
|
|
break; |
|
|
|
break; |
|
|
|
|
|
|
|
|
|
|
|
case ALGO_BLAKE: |
|
|
|
case ALGO_ANIME: |
|
|
|
rc = scanhash_blake32(thr_id, work.data, work.target, |
|
|
|
rc = scanhash_anime(thr_id, work.data, work.target, |
|
|
|
max_nonce, &hashes_done); |
|
|
|
max_nonce, &hashes_done); |
|
|
|
break; |
|
|
|
break; |
|
|
|
|
|
|
|
|
|
|
|
case ALGO_ANIME: |
|
|
|
case ALGO_BLAKE: |
|
|
|
rc = scanhash_anime(thr_id, work.data, work.target, |
|
|
|
rc = scanhash_blake32(thr_id, work.data, work.target, |
|
|
|
max_nonce, &hashes_done); |
|
|
|
max_nonce, &hashes_done); |
|
|
|
break; |
|
|
|
break; |
|
|
|
|
|
|
|
|
|
|
|