From f636f9eef048f4be2bcee8be536fbb6088c4cb52 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Wed, 2 Mar 2016 09:52:45 +1100 Subject: [PATCH] Set old diff on changing mindiff or sugget diff --- src/stratifier.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/stratifier.c b/src/stratifier.c index 6744cdee..ab8ecd0f 100644 --- a/src/stratifier.c +++ b/src/stratifier.c @@ -4812,6 +4812,8 @@ static void set_worker_mindiff(ckpool_t *ckp, const char *workername, int mindif continue; if (mindiff == client->diff) continue; + client->diff_change_job_id = sdata->workbase_id + 1; + client->old_diff = client->diff; client->diff = mindiff; stratum_send_diff(sdata, client); } @@ -5819,6 +5821,8 @@ static void suggest_diff(ckpool_t *ckp, stratum_instance_t *client, const char * client->suggest_diff = sdiff; if (client->diff == sdiff) return; + client->diff_change_job_id = client->sdata->workbase_id + 1; + client->old_diff = client->diff; client->diff = sdiff; stratum_send_diff(ckp->sdata, client); }