From d54a3156ad1ca8318ee453d53f48c43a368c8bd0 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Fri, 30 Jan 2015 12:48:01 +1100 Subject: [PATCH] Read off any cached mindiff when we do a delayed auth --- src/stratifier.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/stratifier.c b/src/stratifier.c index 222429bc..1147e89a 100644 --- a/src/stratifier.c +++ b/src/stratifier.c @@ -2346,13 +2346,16 @@ out: * these clients while ckdb is offline, based on an existing client of the * same username already having been authorised. Needs to be entered with * client holding a ref count. */ -static void queue_delayed_auth(const stratum_instance_t *client) +static void queue_delayed_auth(stratum_instance_t *client) { ckpool_t *ckp = client->ckp; char cdfield[64]; json_t *val; ts_t now; + /* Read off any cached mindiff from previous auths */ + client->suggest_diff = client->worker_instance->mindiff; + ts_realtime(&now); sprintf(cdfield, "%lu,%lu", now.tv_sec, now.tv_nsec);