|
|
@@ -126,7 +126,7 @@ const int opt_cutofftemp = 95;
|
|
|
int opt_hysteresis = 3;
|
|
|
static int opt_retries = -1;
|
|
|
int opt_fail_pause = 5;
|
|
|
-int opt_log_interval = 5;
|
|
|
+int opt_log_interval = 3;
|
|
|
int opt_queue = 1;
|
|
|
int opt_scantime = 60;
|
|
|
int opt_expiry = 120;
|
|
|
@@ -147,7 +147,7 @@ bool opt_scrypt;
|
|
|
#else
|
|
|
static char detect_algo;
|
|
|
#endif
|
|
|
-bool opt_restart = true;
|
|
|
+bool opt_restart;
|
|
|
static bool opt_nogpu;
|
|
|
|
|
|
struct list_head scan_devices;
|
|
|
@@ -1731,11 +1731,6 @@ static bool work_decode(struct pool *pool, struct work *work, json_t *val)
|
|
|
calc_midstate(work);
|
|
|
}
|
|
|
|
|
|
- if (!jobj_binary(res_val, "hash1", work->hash1, sizeof(work->hash1), false)) {
|
|
|
- // Always the same anyway
|
|
|
- memcpy(work->hash1, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x80\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0", 64);
|
|
|
- }
|
|
|
-
|
|
|
if (unlikely(!jobj_binary(res_val, "target", work->target, sizeof(work->target), true))) {
|
|
|
applog(LOG_ERR, "JSON inval target");
|
|
|
return false;
|
|
|
@@ -5953,8 +5948,8 @@ static void set_work_target(struct work *work, double diff)
|
|
|
static void gen_stratum_work(struct pool *pool, struct work *work)
|
|
|
{
|
|
|
unsigned char *coinbase, merkle_root[36], merkle_sha[68], *merkle_hash;
|
|
|
- char header[260], hash1[132], *nonce2;
|
|
|
int len, cb1_len, n1_len, cb2_len, i;
|
|
|
+ char header[260], *nonce2;
|
|
|
uint32_t *data32, *swap32;
|
|
|
|
|
|
memset(work->job_id, 0, 64);
|
|
|
@@ -6023,9 +6018,6 @@ static void gen_stratum_work(struct pool *pool, struct work *work)
|
|
|
if (unlikely(!hex2bin(work->data, header, 128)))
|
|
|
quit(1, "Failed to convert header to data in gen_stratum_work");
|
|
|
calc_midstate(work);
|
|
|
- sprintf(hash1, "00000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000010000");
|
|
|
- if (unlikely(!hex2bin(work->hash1, hash1, 64)))
|
|
|
- quit(1, "Failed to convert hash1 in gen_stratum_work");
|
|
|
|
|
|
set_work_target(work, work->sdiff);
|
|
|
|