Browse Source

Merge branch 'auto_solomine' into bfgminer

Luke Dashjr 11 years ago
parent
commit
097ba63c40
1 changed files with 13 additions and 1 deletions
  1. 13 1
      miner.c

+ 13 - 1
miner.c

@@ -123,12 +123,12 @@ static char packagename[256];
 
 bool opt_protocol;
 bool opt_dev_protocol;
-static bool opt_load_bitcoin_conf = true;
 static bool opt_benchmark;
 static bool want_longpoll = true;
 static bool want_gbt = true;
 static bool want_getwork = true;
 #if BLKMAKER_VERSION > 1
+static bool opt_load_bitcoin_conf = true;
 static bool have_at_least_one_getcbaddr;
 static bytes_t opt_coinbase_script = BYTES_INIT;
 static uint32_t coinbase_script_block_id;
@@ -1094,8 +1094,10 @@ static
 void pool_set_uri(struct pool * const pool, char * const uri)
 {
 	pool->rpc_url = uri;
+#if BLKMAKER_VERSION > 1
 	if (uri_get_param_bool(uri, "getcbaddr", false))
 		have_at_least_one_getcbaddr = true;
+#endif
 }
 
 /* Pool variant of test and set */
@@ -2188,8 +2190,12 @@ static struct opt_table opt_config_table[] = {
 #endif
 	),
 	OPT_WITHOUT_ARG("--no-local-bitcoin",
+#if BLKMAKER_VERSION > 1
 	                opt_set_invbool, &opt_load_bitcoin_conf,
 	                "Disable adding pools for local bitcoin RPC servers"),
+#else
+	                set_null, NULL, opt_hidden),
+#endif
 	OPT_WITHOUT_ARG("--no-longpoll",
 			opt_set_invbool, &want_longpoll,
 			"Disable X-Long-Polling support"),
@@ -2835,6 +2841,7 @@ void work_set_simple_ntime_roll_limit(struct work * const work, const int ntime_
 	set_simple_ntime_roll_limit(&work->ntime_roll_limits, upk_u32be(work->data, 0x44), ntime_roll);
 }
 
+#if BLKMAKER_VERSION > 1
 static
 void refresh_bitcoind_address(const bool fresh)
 {
@@ -2909,6 +2916,7 @@ void refresh_bitcoind_address(const bool fresh)
 	if (curl)
 		curl_easy_cleanup(curl);
 }
+#endif
 
 static double target_diff(const unsigned char *);
 
@@ -10956,6 +10964,7 @@ out:
 }
 #endif
 
+#if BLKMAKER_VERSION > 1
 static
 bool _add_local_gbt(const char * const filepath, void *userp)
 {
@@ -11038,6 +11047,7 @@ void add_local_gbt(bool live)
 {
 	appdata_file_call("Bitcoin", "bitcoin.conf", _add_local_gbt, &live);
 }
+#endif
 
 #if defined(unix) || defined(__APPLE__)
 static void fork_monitor()
@@ -12392,8 +12402,10 @@ int main(int argc, char *argv[])
 	switch_logsize();
 #endif
 
+#if BLKMAKER_VERSION > 1
 	if (opt_load_bitcoin_conf && !(opt_scrypt || opt_benchmark))
 		add_local_gbt(total_pools);
+#endif
 	
 	if (!total_pools) {
 		applog(LOG_WARNING, "Need to specify at least one pool server.");