mirror of
https://github.com/GOSTSec/sgminer
synced 2025-02-02 10:04:33 +00:00
Remove the ability to disable longpoll. It is not a useful feature and will conflict with planned changes to longpoll code.
This commit is contained in:
parent
8e84abfc22
commit
e502fde52b
1
README
1
README
@ -133,7 +133,6 @@ Options for both config file and command line:
|
|||||||
--log|-l <arg> Interval in seconds between log output (default: 5)
|
--log|-l <arg> Interval in seconds between log output (default: 5)
|
||||||
--monitor|-m <arg> Use custom pipe cmd for output messages
|
--monitor|-m <arg> Use custom pipe cmd for output messages
|
||||||
--net-delay Impose small delays in networking to not overload slow routers
|
--net-delay Impose small delays in networking to not overload slow routers
|
||||||
--no-longpoll Disable X-Long-Polling support
|
|
||||||
--pass|-p <arg> Password for bitcoin JSON-RPC server
|
--pass|-p <arg> Password for bitcoin JSON-RPC server
|
||||||
--per-device-stats Force verbose mode and output per-device statistics
|
--per-device-stats Force verbose mode and output per-device statistics
|
||||||
--protocol-dump|-P Verbose dump of protocol-level activities
|
--protocol-dump|-P Verbose dump of protocol-level activities
|
||||||
|
20
cgminer.c
20
cgminer.c
@ -81,7 +81,6 @@ int gpu_threads;
|
|||||||
|
|
||||||
bool opt_protocol = false;
|
bool opt_protocol = false;
|
||||||
static bool opt_benchmark;
|
static bool opt_benchmark;
|
||||||
static bool want_longpoll = true;
|
|
||||||
static bool have_longpoll = false;
|
static bool have_longpoll = false;
|
||||||
static bool want_per_device_stats = false;
|
static bool want_per_device_stats = false;
|
||||||
bool use_syslog = false;
|
bool use_syslog = false;
|
||||||
@ -850,9 +849,6 @@ static struct opt_table opt_config_table[] = {
|
|||||||
opt_hidden
|
opt_hidden
|
||||||
#endif
|
#endif
|
||||||
),
|
),
|
||||||
OPT_WITHOUT_ARG("--no-longpoll",
|
|
||||||
opt_set_invbool, &want_longpoll,
|
|
||||||
"Disable X-Long-Polling support"),
|
|
||||||
OPT_WITHOUT_ARG("--no-restart",
|
OPT_WITHOUT_ARG("--no-restart",
|
||||||
opt_set_invbool, &opt_restart,
|
opt_set_invbool, &opt_restart,
|
||||||
#ifdef HAVE_OPENCL
|
#ifdef HAVE_OPENCL
|
||||||
@ -2019,7 +2015,7 @@ static void *get_work_thread(void *userdata)
|
|||||||
struct work *ret_work;
|
struct work *ret_work;
|
||||||
int failures = 0;
|
int failures = 0;
|
||||||
|
|
||||||
if (unlikely(want_longpoll && !pool->is_lp && pool == current_pool() &&
|
if (unlikely(!pool->is_lp && pool == current_pool() &&
|
||||||
pool->hdr_path && !pool_tset(pool, &pool->lp_sent))) {
|
pool->hdr_path && !pool_tset(pool, &pool->lp_sent))) {
|
||||||
stop_longpoll();
|
stop_longpoll();
|
||||||
start_longpoll();
|
start_longpoll();
|
||||||
@ -2941,7 +2937,6 @@ static void set_options(void)
|
|||||||
immedok(logwin, true);
|
immedok(logwin, true);
|
||||||
clear_logwin();
|
clear_logwin();
|
||||||
retry:
|
retry:
|
||||||
wlogprint("\n[L]ongpoll: %s\n", want_longpoll ? "On" : "Off");
|
|
||||||
wlogprint("[Q]ueue: %d\n[S]cantime: %d\n[E]xpiry: %d\n[R]etries: %d\n"
|
wlogprint("[Q]ueue: %d\n[S]cantime: %d\n[E]xpiry: %d\n[R]etries: %d\n"
|
||||||
"[P]ause: %d\n[W]rite config file\n[C]gminer restart\n",
|
"[P]ause: %d\n[W]rite config file\n[C]gminer restart\n",
|
||||||
opt_queue, opt_scantime, opt_expiry, opt_retries, opt_fail_pause);
|
opt_queue, opt_scantime, opt_expiry, opt_retries, opt_fail_pause);
|
||||||
@ -2956,15 +2951,6 @@ retry:
|
|||||||
}
|
}
|
||||||
opt_queue = selected;
|
opt_queue = selected;
|
||||||
goto retry;
|
goto retry;
|
||||||
} else if (!strncasecmp(&input, "l", 1)) {
|
|
||||||
want_longpoll ^= true;
|
|
||||||
applog(LOG_WARNING, "Longpoll %s", want_longpoll ? "enabled" : "disabled");
|
|
||||||
if (!want_longpoll) {
|
|
||||||
if (have_longpoll)
|
|
||||||
stop_longpoll();
|
|
||||||
} else
|
|
||||||
start_longpoll();
|
|
||||||
goto retry;
|
|
||||||
} else if (!strncasecmp(&input, "s", 1)) {
|
} else if (!strncasecmp(&input, "s", 1)) {
|
||||||
selected = curses_int("Set scantime in seconds");
|
selected = curses_int("Set scantime in seconds");
|
||||||
if (selected < 0 || selected > 9999) {
|
if (selected < 0 || selected > 9999) {
|
||||||
@ -4693,7 +4679,6 @@ int main(int argc, char *argv[])
|
|||||||
if (opt_benchmark) {
|
if (opt_benchmark) {
|
||||||
struct pool *pool;
|
struct pool *pool;
|
||||||
|
|
||||||
want_longpoll = false;
|
|
||||||
pool = calloc(sizeof(struct pool), 1);
|
pool = calloc(sizeof(struct pool), 1);
|
||||||
pool->pool_no = 0;
|
pool->pool_no = 0;
|
||||||
pools[total_pools++] = pool;
|
pools[total_pools++] = pool;
|
||||||
@ -4985,8 +4970,7 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
} while (!pools_active);
|
} while (!pools_active);
|
||||||
|
|
||||||
if (want_longpoll)
|
start_longpoll();
|
||||||
start_longpoll();
|
|
||||||
|
|
||||||
begin_bench:
|
begin_bench:
|
||||||
total_mhashes_done = 0;
|
total_mhashes_done = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user