mirror of
https://github.com/GOSTSec/ccminer
synced 2025-01-11 07:17:53 +00:00
internal opt_extranonce param, not linked to cmdline...
This commit is contained in:
parent
477d3bfd7c
commit
51abf151ee
@ -184,6 +184,7 @@ int opt_n_threads = 0;
|
|||||||
int opt_affinity = -1;
|
int opt_affinity = -1;
|
||||||
int opt_priority = 0;
|
int opt_priority = 0;
|
||||||
static double opt_difficulty = 1; // CH
|
static double opt_difficulty = 1; // CH
|
||||||
|
bool opt_extranonce = true;
|
||||||
bool opt_trust_pool = false;
|
bool opt_trust_pool = false;
|
||||||
uint16_t opt_vote = 9999;
|
uint16_t opt_vote = 9999;
|
||||||
int num_cpus;
|
int num_cpus;
|
||||||
|
5
util.cpp
5
util.cpp
@ -1125,6 +1125,8 @@ out:
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extern bool opt_extranonce;
|
||||||
|
|
||||||
bool stratum_authorize(struct stratum_ctx *sctx, const char *user, const char *pass)
|
bool stratum_authorize(struct stratum_ctx *sctx, const char *user, const char *pass)
|
||||||
{
|
{
|
||||||
json_t *val = NULL, *res_val, *err_val;
|
json_t *val = NULL, *res_val, *err_val;
|
||||||
@ -1170,6 +1172,9 @@ bool stratum_authorize(struct stratum_ctx *sctx, const char *user, const char *p
|
|||||||
sctx->tm_connected = time(NULL);
|
sctx->tm_connected = time(NULL);
|
||||||
ret = true;
|
ret = true;
|
||||||
|
|
||||||
|
if (!opt_extranonce)
|
||||||
|
goto out;
|
||||||
|
|
||||||
// subscribe to extranonce (optional)
|
// subscribe to extranonce (optional)
|
||||||
sprintf(s, "{\"id\": 3, \"method\": \"mining.extranonce.subscribe\", \"params\": []}");
|
sprintf(s, "{\"id\": 3, \"method\": \"mining.extranonce.subscribe\", \"params\": []}");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user