Browse Source

Replace --no-client-reconnect with --no-pool-redirect which also disables X-Stratum header redirects

Luke Dashjr 11 years ago
parent
commit
a22650feb1
2 changed files with 13 additions and 1 deletions
  1. 1 0
      README
  2. 12 1
      miner.c

+ 1 - 0
README

@@ -259,6 +259,7 @@ Options for both config file and command line:
 --no-gbt            Disable getblocktemplate support
 --no-getwork        Disable getwork support
 --no-longpoll       Disable X-Long-Polling support
+--no-pool-redirect  Ignore pool requests to redirect to another server
 --no-restart        Do not attempt to restart devices that hang
 --no-stratum        Disable Stratum detection
 --no-submit-stale   Don't submit shares if they are detected as stale

+ 12 - 1
miner.c

@@ -1758,6 +1758,14 @@ char *set_no_opencl_binaries(__maybe_unused void * const dummy)
 	return NULL;
 }
 
+static
+char *disable_pool_redirect(__maybe_unused void * const dummy)
+{
+	opt_disable_client_reconnect = true;
+	want_stratum = false;
+	return NULL;
+}
+
 static char *set_api_allow(const char *arg)
 {
 	opt_set_charp(arg, &opt_api_allow);
@@ -2187,7 +2195,10 @@ static struct opt_table opt_config_table[] = {
 			opt_hidden),
 	OPT_WITHOUT_ARG("--no-client-reconnect",
 			opt_set_invbool, &opt_disable_client_reconnect,
-			"Disable 'client.reconnect' stratum functionality"),
+			opt_hidden),
+	OPT_WITHOUT_ARG("--no-pool-redirect",
+			disable_pool_redirect, NULL,
+			"Ignore pool requests to redirect to another server"),
 	OPT_WITHOUT_ARG("--no-restart",
 			opt_set_invbool, &opt_restart,
 			"Do not attempt to restart devices that hang"