From 4fd9ee5eda3bbc0f0e0118112e167d4ae20e35b1 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Thu, 21 Jan 2016 12:39:27 +1100 Subject: [PATCH] Fix user stats not updating in node mode --- src/stratifier.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/stratifier.c b/src/stratifier.c index d27fee47..edd8b5b9 100644 --- a/src/stratifier.c +++ b/src/stratifier.c @@ -4828,9 +4828,6 @@ static void add_submit(ckpool_t *ckp, stratum_instance_t *client, const double d } else if (!submit) return; - if (ckp->node) - return; - tv_time(&now_t); ck_rlock(&sdata->workbase_lock); @@ -4857,6 +4854,11 @@ static void add_submit(ckpool_t *ckp, stratum_instance_t *client, const double d copy_tv(&user->last_share, &now_t); client->idle = false; + /* Once we've updated user/client statistics in node mode, we can't + * alter diff ourselves. */ + if (ckp->node) + return; + client->ssdc++; bdiff = sane_tdiff(&now_t, &client->first_share); bias = time_bias(bdiff, 300);