From 1e175d851c6b87e12142462b453531cf632a050d Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Fri, 3 Oct 2014 09:57:27 +1000 Subject: [PATCH] Missing valid but not submitted count for proxy --- src/stratifier.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/stratifier.c b/src/stratifier.c index bd2252e2..2a5090b1 100644 --- a/src/stratifier.c +++ b/src/stratifier.c @@ -1740,7 +1740,8 @@ static double sane_tdiff(tv_t *end, tv_t *start) return tdiff; } -static void add_submit(ckpool_t *ckp, stratum_instance_t *client, int diff, bool valid) +static void add_submit(ckpool_t *ckp, stratum_instance_t *client, int diff, bool valid, + bool submit) { worker_instance_t *worker = client->worker_instance; double tdiff, bdiff, dsps, drr, network_diff, bias; @@ -1757,7 +1758,7 @@ static void add_submit(ckpool_t *ckp, stratum_instance_t *client, int diff, bool mutex_unlock(&stats_lock); /* Count only accepted and stale rejects in diff calculation. */ - if (!valid) + if (!valid && !submit) return; tv_time(&now_t); @@ -2193,7 +2194,7 @@ out_unlock: submit_share(client, id, nonce2, ntime, nonce, json_integer_value(json_object_get(json_msg, "id"))); } - add_submit(ckp, client, diff, submit); + add_submit(ckp, client, diff, result, submit); /* Now write to the pool's sharelog. */ val = json_object();