|
|
@ -151,6 +151,7 @@ bool opt_api_network; |
|
|
|
bool opt_delaynet; |
|
|
|
bool opt_delaynet; |
|
|
|
bool opt_disable_pool; |
|
|
|
bool opt_disable_pool; |
|
|
|
bool opt_disable_client_reconnect = false; |
|
|
|
bool opt_disable_client_reconnect = false; |
|
|
|
|
|
|
|
bool opt_extranonce_subscribe = true; |
|
|
|
static bool no_work; |
|
|
|
static bool no_work; |
|
|
|
bool opt_worktime; |
|
|
|
bool opt_worktime; |
|
|
|
#if defined(HAVE_LIBCURL) && defined(CURL_HAS_KEEPALIVE) |
|
|
|
#if defined(HAVE_LIBCURL) && defined(CURL_HAS_KEEPALIVE) |
|
|
@ -1327,6 +1328,9 @@ static struct opt_table opt_config_table[] = { |
|
|
|
OPT_WITHOUT_ARG("--no-submit-stale", |
|
|
|
OPT_WITHOUT_ARG("--no-submit-stale", |
|
|
|
opt_set_invbool, &opt_submit_stale, |
|
|
|
opt_set_invbool, &opt_submit_stale, |
|
|
|
"Don't submit shares if they are detected as stale"), |
|
|
|
"Don't submit shares if they are detected as stale"), |
|
|
|
|
|
|
|
OPT_WITHOUT_ARG("--no-extranonce-subscribe", |
|
|
|
|
|
|
|
opt_set_invbool, &opt_extranonce_subscribe, |
|
|
|
|
|
|
|
"Disable 'extranonce' stratum subscribe"), |
|
|
|
OPT_WITH_ARG("--pass|-p", |
|
|
|
OPT_WITH_ARG("--pass|-p", |
|
|
|
set_pass, NULL, NULL, |
|
|
|
set_pass, NULL, NULL, |
|
|
|
"Password for bitcoin JSON-RPC server"), |
|
|
|
"Password for bitcoin JSON-RPC server"), |
|
|
@ -5207,7 +5211,7 @@ static bool parse_stratum_response(struct pool *pool, char *s) |
|
|
|
if (err_val && !json_is_null(err_val)) { |
|
|
|
if (err_val && !json_is_null(err_val)) { |
|
|
|
char *ss; |
|
|
|
char *ss; |
|
|
|
ss = (char *)json_string_value(json_array_get(err_val, 1)); |
|
|
|
ss = (char *)json_string_value(json_array_get(err_val, 1)); |
|
|
|
if (strcmp(ss, "Method 'subscribe' not found for service 'mining.extranonce'") == 0) { |
|
|
|
if (opt_extranonce_subscribe && strcmp(ss, "Method 'subscribe' not found for service 'mining.extranonce'") == 0) { |
|
|
|
applog(LOG_INFO, "Cannot subscribe to mining.extranonce on %s", get_pool_name(pool)); |
|
|
|
applog(LOG_INFO, "Cannot subscribe to mining.extranonce on %s", get_pool_name(pool)); |
|
|
|
goto out; |
|
|
|
goto out; |
|
|
|
} |
|
|
|
} |
|
|
@ -5682,7 +5686,7 @@ retry_stratum: |
|
|
|
bool init = pool_tset(pool, &pool->stratum_init); |
|
|
|
bool init = pool_tset(pool, &pool->stratum_init); |
|
|
|
|
|
|
|
|
|
|
|
if (!init) { |
|
|
|
if (!init) { |
|
|
|
bool ret = initiate_stratum(pool) && auth_stratum(pool) && subscribe_extranonce(pool); |
|
|
|
bool ret = initiate_stratum(pool) && auth_stratum(pool) && (!opt_extranonce_subscribe || subscribe_extranonce(pool)); |
|
|
|
|
|
|
|
|
|
|
|
if (ret) |
|
|
|
if (ret) |
|
|
|
init_stratum_threads(pool); |
|
|
|
init_stratum_threads(pool); |
|
|
|