From 5ef0829c74802f1482d02f664b62c7ce80facc5b Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Thu, 21 Aug 2014 12:26:19 +1000 Subject: [PATCH] Don't bother counting share diff until it matches the client set diff and don't reproduce the diff change job id test already performed when determining diff in parse_submit --- src/stratifier.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/stratifier.c b/src/stratifier.c index f8574ffc..c6004513 100644 --- a/src/stratifier.c +++ b/src/stratifier.c @@ -1450,12 +1450,10 @@ static void add_submit(ckpool_t *ckp, stratum_instance_t *client, int diff, bool if (client->ssdc < 72 && tdiff < 240) return; - if (diff != client->diff) - return; - - /* We have the effect of a change pending */ - if (client->diff_change_job_id >= next_blockid) + if (diff != client->diff) { + client->ssdc = 0; return; + } /* Diff rate ratio */ dsps = client->dsps5 / bias;