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