Browse Source

Show share hash as little endian as needed.

nfactor-troky
Con Kolivas 12 years ago
parent
commit
b3e734e7e1
  1. 4
      cgminer.c

4
cgminer.c

@ -3321,7 +3321,7 @@ static void *submit_work_thread(void *userdata)
pool->rpc_user, work->job_id, work->nonce2, work->ntime, noncehex, sshare->id); pool->rpc_user, work->job_id, work->nonce2, work->ntime, noncehex, sshare->id);
free(noncehex); free(noncehex);
applog(LOG_INFO, "Submitting share %08lx to pool %d", hash32[6], pool->pool_no); applog(LOG_INFO, "Submitting share %08lx to pool %d", htole32(hash32[6]), pool->pool_no);
/* Try resubmitting for up to 2 minutes if we fail to submit /* Try resubmitting for up to 2 minutes if we fail to submit
* once and the stratum pool nonce1 still matches suggesting * once and the stratum pool nonce1 still matches suggesting
@ -4742,7 +4742,7 @@ static void stratum_share_result(json_t *val, json_t *res_val, json_t *err_val,
hash32 = (uint32_t *)(work->hash); hash32 = (uint32_t *)(work->hash);
intdiff = floor(work->work_difficulty); intdiff = floor(work->work_difficulty);
suffix_string(sharediff, diffdisp, 0); suffix_string(sharediff, diffdisp, 0);
sprintf(hashshow, "%08lx Diff %s/%d%s", (unsigned long)(hash32[6]), diffdisp, intdiff, sprintf(hashshow, "%08lx Diff %s/%d%s", (unsigned long)htole32(hash32[6]), diffdisp, intdiff,
work->block? " BLOCK!" : ""); work->block? " BLOCK!" : "");
share_result(val, res_val, err_val, work, hashshow, false, ""); share_result(val, res_val, err_val, work, hashshow, false, "");
} }

Loading…
Cancel
Save