From f85089eeec55311c2e0ff3bd52e8d89f059c469e Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Fri, 7 Nov 2014 11:48:27 +1100 Subject: [PATCH] Remove EOS marker in userstats in preparation for moving from client to worker stats --- src/stratifier.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/stratifier.c b/src/stratifier.c index d905d081..9c4c1715 100644 --- a/src/stratifier.c +++ b/src/stratifier.c @@ -3173,9 +3173,9 @@ out: static void update_userstats(ckpool_t *ckp) { stratum_instance_t *client, *tmp; - json_t *val = NULL; char cdfield[64]; time_t now_t; + json_t *val; ts_t ts_now; if (++stats.userstats_cycle > 0x1f) @@ -3204,11 +3204,6 @@ static void update_userstats(ckpool_t *ckp) if (cycle_mask != stats.userstats_cycle) continue; - if (val) { - json_set_bool(val,"eos", false); - ckdbq_add(ckp, ID_USERSTATS, val); - val = NULL; - } elapsed = now_t - client->start_time; ghs1 = client->dsps1 * nonces; ghs5 = client->dsps5 * nonces; @@ -3230,12 +3225,8 @@ static void update_userstats(ckpool_t *ckp) "createcode", __func__, "createinet", ckp->serverurl); client->notified_idle = client->idle; - } - /* Mark the last userstats sent on this pass of stats with an end of - * stats marker. */ - if (val) { - json_set_bool(val,"eos", true); ckdbq_add(ckp, ID_USERSTATS, val); + val = NULL; } ck_runlock(&instance_lock); }