From 897df18c2f9f6d677e4946cb746be183b89c01b6 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Sun, 1 Feb 2015 17:58:11 +1100 Subject: [PATCH] Send a whole update to a client instead of just the diff if they've only been sending rejects --- src/stratifier.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/stratifier.c b/src/stratifier.c index 6bdba364..836e7a63 100644 --- a/src/stratifier.c +++ b/src/stratifier.c @@ -2828,6 +2828,8 @@ static bool new_share(sdata_t *sdata, const uchar *hash, const int64_t wb_id) return ret; } +static void update_client(sdata_t *sdata, const stratum_instance_t *client, const int64_t client_id); + /* Submit a share in proxy mode to the parent pool. workbase_lock is held. * Needs to be entered with client holding a ref count. */ static void submit_share(stratum_instance_t *client, const int64_t jobid, const char *nonce2, @@ -3075,8 +3077,8 @@ out: client->reject = 2; } else if (client->first_invalid && client->first_invalid < now_t - 60) { if (!client->reject) { - LOGINFO("Client %ld rejecting for 60s, sending diff", client->id); - stratum_send_diff(sdata, client); + LOGINFO("Client %ld rejecting for 60s, sending update", client->id); + update_client(sdata, client, client->id); client->reject = 1; } }