1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-11 15:27:53 +00:00

Copy parameters from stratum work required for share submission.

This commit is contained in:
Con Kolivas 2012-09-29 15:02:23 +10:00
parent 4a29759480
commit aa93fa336c
2 changed files with 9 additions and 1 deletions

View File

@ -4320,7 +4320,6 @@ static void gen_stratum_work(struct pool *pool, struct work *work)
nonce2 = bin2hex((const unsigned char *)&pool->nonce2, pool->n2size); nonce2 = bin2hex((const unsigned char *)&pool->nonce2, pool->n2size);
pool->nonce2++; pool->nonce2++;
strcat(coinbase, nonce2); strcat(coinbase, nonce2);
free(nonce2);
strcat(coinbase, pool->swork.coinbase2); strcat(coinbase, pool->swork.coinbase2);
/* Generate merkle root */ /* Generate merkle root */
@ -4347,6 +4346,11 @@ static void gen_stratum_work(struct pool *pool, struct work *work)
diff = pool->swork.diff; diff = pool->swork.diff;
/* Copy parameters required for share submission */
work->job_id = strdup(pool->swork.job_id);
work->nonce2 = nonce2;
work->ntime = pool->swork.ntime;
mutex_unlock(&pool->pool_lock); mutex_unlock(&pool->pool_lock);
applog(LOG_DEBUG, "Generated stratum coinbase %s", coinbase); applog(LOG_DEBUG, "Generated stratum coinbase %s", coinbase);

View File

@ -880,7 +880,11 @@ struct work {
bool mandatory; bool mandatory;
bool block; bool block;
bool queued; bool queued;
bool stratum; bool stratum;
char *job_id;
char *nonce2;
char *ntime;
unsigned int work_block; unsigned int work_block;
int id; int id;