Autodetect nicehash by url
This commit is contained in:
parent
2baccab0f9
commit
20061e1b8b
2 changed files with 11 additions and 2 deletions
|
@ -441,6 +441,10 @@ void parse_cmdline(int argc, char *argv[]) {
|
|||
proper_exit(1);
|
||||
}
|
||||
|
||||
if (strstr(opt_url, ".nicehash.com:") != NULL) {
|
||||
opt_nicehash = true;
|
||||
}
|
||||
|
||||
if (!opt_userpass) {
|
||||
opt_userpass = malloc(strlen(opt_user) + strlen(opt_pass) + 2);
|
||||
if (!opt_userpass) {
|
||||
|
|
|
@ -71,11 +71,16 @@ static void print_cpu() {
|
|||
|
||||
|
||||
static void print_threads() {
|
||||
const char *extra = "";
|
||||
if (opt_nicehash) {
|
||||
extra = ", nicehash";
|
||||
}
|
||||
|
||||
if (opt_colors) {
|
||||
applog_notime(LOG_INFO, CL_LGR " * " CL_WHT "THREADS: " CL_WHT "%d" CL_WHT ", av=%d, %s, donate=%d%%", opt_n_threads, opt_algo_variant, get_current_algo_name(), opt_donate_level);
|
||||
applog_notime(LOG_INFO, CL_LGR " * " CL_WHT "THREADS: " CL_WHT "%d" CL_WHT ", av=%d, %s, donate=%d%%%s", opt_n_threads, opt_algo_variant, get_current_algo_name(), opt_donate_level, extra);
|
||||
}
|
||||
else {
|
||||
applog_notime(LOG_INFO, " * THREADS: %d, av=%d, %s, donate=%d%%", opt_n_threads, opt_algo_variant, get_current_algo_name(), opt_donate_level);
|
||||
applog_notime(LOG_INFO, " * THREADS: %d, av=%d, %s, donate=%d%%%s", opt_n_threads, opt_algo_variant, get_current_algo_name(), opt_donate_level, extra);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue