From bcec5f510203f7f663a7d2d7c330043256d86890 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Wed, 27 Jun 2012 23:30:50 +1000 Subject: [PATCH] Revert "Check we don't exhaust the entire unsigned 32 bit ntime range when rolling time to cope with extremely high hashrates." This reverts commit 522f620c89b5f152f86a2916b0dca7b71b2a5005. Unrealistic. Limits are bitcoind related to 2 hours in the future. --- cgminer.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/cgminer.c b/cgminer.c index a3528246..756e0059 100644 --- a/cgminer.c +++ b/cgminer.c @@ -3649,17 +3649,13 @@ static inline bool can_roll(struct work *work) return (work->pool && !stale_work(work, false) && work->rolltime && !work->clone); } -static bool roll_work(struct work *work) +static void roll_work(struct work *work) { uint32_t *work_ntime; uint32_t ntime; work_ntime = (uint32_t *)(work->data + 68); ntime = be32toh(*work_ntime); - if (unlikely(ntime == 0xFFFFFFFF)) { - applog(LOG_DEBUG, "Exhausted ntime space, cannot roll work"); - return false; - } ntime++; *work_ntime = htobe32(ntime); local_work++; @@ -3670,14 +3666,13 @@ static bool roll_work(struct work *work) /* This is now a different work item so it needs a different ID for the * hashtable */ work->id = total_work++; - return true; } static bool reuse_work(struct work *work) { if (can_roll(work) && should_roll(work)) { - if (likely(roll_work(work))) - return true; + roll_work(work); + return true; } return false; }