mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-11 15:27:53 +00:00
Use same string for debug as for submission and make string larger to cope with future GBT messages.
This commit is contained in:
parent
914e88bbad
commit
59087a5d77
13
cgminer.c
13
cgminer.c
@ -2258,7 +2258,7 @@ static bool submit_upstream_work(struct work *work, CURL *curl, bool resubmit)
|
|||||||
{
|
{
|
||||||
char *hexstr = NULL;
|
char *hexstr = NULL;
|
||||||
json_t *val, *res, *err;
|
json_t *val, *res, *err;
|
||||||
char s[345], sd[345];
|
char s[1024];
|
||||||
bool rc = false;
|
bool rc = false;
|
||||||
int thr_id = work->thr_id;
|
int thr_id = work->thr_id;
|
||||||
struct cgpu_info *cgpu = thr_info[thr_id].cgpu;
|
struct cgpu_info *cgpu = thr_info[thr_id].cgpu;
|
||||||
@ -2279,14 +2279,9 @@ static bool submit_upstream_work(struct work *work, CURL *curl, bool resubmit)
|
|||||||
hexstr = bin2hex(work->data, sizeof(work->data));
|
hexstr = bin2hex(work->data, sizeof(work->data));
|
||||||
|
|
||||||
/* build JSON-RPC request */
|
/* build JSON-RPC request */
|
||||||
sprintf(s,
|
sprintf(s, "{\"method\": \"getwork\", \"params\": [ \"%s\" ], \"id\":1}", hexstr);
|
||||||
"{\"method\": \"getwork\", \"params\": [ \"%s\" ], \"id\":1}\r\n",
|
applog(LOG_DEBUG, "DBG: sending %s submit RPC call: %s", pool->rpc_url, s);
|
||||||
hexstr);
|
strcat(s, "\n");
|
||||||
sprintf(sd,
|
|
||||||
"{\"method\": \"getwork\", \"params\": [ \"%s\" ], \"id\":1}",
|
|
||||||
hexstr);
|
|
||||||
|
|
||||||
applog(LOG_DEBUG, "DBG: sending %s submit RPC call: %s", pool->rpc_url, sd);
|
|
||||||
|
|
||||||
gettimeofday(&tv_submit, NULL);
|
gettimeofday(&tv_submit, NULL);
|
||||||
/* issue JSON-RPC request */
|
/* issue JSON-RPC request */
|
||||||
|
Loading…
Reference in New Issue
Block a user