From 3ffc3f1d78c56e3956b20fb5eba88672b12c159c Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Fri, 25 Oct 2013 14:41:23 +1100 Subject: [PATCH] Adjust the binary ntime data in submit_noffset_nonce even when there is no hex ntime string for eg. gbt. --- cgminer.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cgminer.c b/cgminer.c index dd43fa0e..99dbaa78 100644 --- a/cgminer.c +++ b/cgminer.c @@ -3583,6 +3583,12 @@ static void _copy_work(struct work *work, const struct work *base_work, int noff work->ntime = offset_ntime(base_work->ntime, noffset); } else work->ntime = strdup(base_work->ntime); + } else if (noffset) { + uint32_t *work_ntime = (uint32_t *)(work->data + 68); + uint32_t ntime = be32toh(*work_ntime); + + ntime += noffset; + *work_ntime = htobe32(ntime); } if (base_work->coinbase) work->coinbase = strdup(base_work->coinbase);