From 2d60bd2dce37d9828416287b54a2c3bf4d2791ca Mon Sep 17 00:00:00 2001 From: ckolivas Date: Thu, 14 Jan 2016 10:42:43 +1100 Subject: [PATCH] Reversed calculation --- src/stratifier.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stratifier.c b/src/stratifier.c index 693b08d5..c69d006f 100644 --- a/src/stratifier.c +++ b/src/stratifier.c @@ -5145,7 +5145,7 @@ static json_t *parse_submit(stratum_instance_t *client, json_t *json_msg, tv_t now_tv; ts_to_tv(&now_tv, &now); - latency = ms_tvdiff(&wb->retired, &now_tv); + latency = ms_tvdiff(&now_tv, &wb->retired); if (latency < client->latency) { LOGDEBUG("Accepting %dms late share from client %"PRId64, latency, client->id); goto no_stale;