1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-10 23:08:07 +00:00

Show share hash as little endian as needed.

This commit is contained in:
Con Kolivas 2013-04-03 02:12:00 +11:00
parent ea4cf57d94
commit b3e734e7e1

View File

@ -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, "");
} }