From 7acd1b0c10d91551e72bfe2dbf302001960d017c Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Sun, 27 Apr 2014 22:16:47 +1000 Subject: [PATCH] Accept the lower of new and old diffs until the next update --- src/stratifier.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/stratifier.c b/src/stratifier.c index 5f285fd2..80d10a98 100644 --- a/src/stratifier.c +++ b/src/stratifier.c @@ -921,7 +921,8 @@ static json_t *parse_submit(stratum_instance_t *client, json_t *json_msg, out_unlock: ck_runlock(&workbase_lock); - if (id < client->diff_change_job_id) + /* Accept the lower of new and old diffs until the next update */ + if (id < client->diff_change_job_id && client->old_diff < client->diff) diff = client->old_diff; else diff = client->diff;