From 319d0943fc8e2a060295c5fa508b967f388ced26 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Fri, 13 Feb 2015 12:14:31 +1100 Subject: [PATCH] Update diff on all stratifier data but send diff only to clients bound to the current subproxy --- src/stratifier.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/stratifier.c b/src/stratifier.c index 458ffc37..e089d621 100644 --- a/src/stratifier.c +++ b/src/stratifier.c @@ -1312,10 +1312,6 @@ static void update_diff(ckpool_t *ckp, const char *cmd) LOGNOTICE("Got updated diff for proxy %d", id); proxy = subproxy_by_id(sdata, id, subid); - if (proxy->parent != current_proxy(sdata)) { - LOGINFO("Diff from backup proxy"); - return; - } /* We only really care about integer diffs so clamp the lower limit to * 1 or it will round down to zero. */ @@ -1338,6 +1334,8 @@ static void update_diff(ckpool_t *ckp, const char *cmd) HASH_ITER(hh, sdata->stratum_instances, client, tmp) { if (client->proxyid != id) continue; + if (client->subproxyid != subid) + continue; if (client->diff > diff) { client->diff = diff; stratum_send_diff(sdata, client);