From de5c5e4a398a22d116f615a7fa3b032d7d9632f7 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Fri, 18 Jul 2014 15:07:07 +1000 Subject: [PATCH] Set the last diff change variable to the time of the first received share --- src/stratifier.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/stratifier.c b/src/stratifier.c index 1fea454d..68263689 100644 --- a/src/stratifier.c +++ b/src/stratifier.c @@ -1345,8 +1345,10 @@ static void add_submit(stratum_instance_t *client, int diff, bool valid) ck_runlock(&workbase_lock); tdiff = sane_tdiff(&now_t, &client->last_share); - if (unlikely(!client->first_share.tv_sec)) + if (unlikely(!client->first_share.tv_sec)) { copy_tv(&client->first_share, &now_t); + copy_tv(&client->ldc, &now_t); + } decay_time(&client->dsps1, diff, tdiff, 60); decay_time(&client->dsps5, diff, tdiff, 300); decay_time(&client->dsps60, diff, tdiff, 3600);