From 5a7febc821575bf77f06f0fb486c6eef7b53c58b Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Fri, 20 Feb 2015 12:20:08 +1100 Subject: [PATCH] Workbase id and blockchange id are determined by the generator in proxy mode and should not be set per proxy --- src/stratifier.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/stratifier.c b/src/stratifier.c index c23c2135..e252e281 100644 --- a/src/stratifier.c +++ b/src/stratifier.c @@ -1019,7 +1019,6 @@ static void drop_allclients(ckpool_t *ckp) static sdata_t *duplicate_sdata(const sdata_t *sdata) { sdata_t *dsdata = ckzalloc(sizeof(sdata_t)); - int64_t randomiser; dsdata->ckp = sdata->ckp; @@ -1035,10 +1034,7 @@ static sdata_t *duplicate_sdata(const sdata_t *sdata) dsdata->sauthq = sdata->sauthq; dsdata->stxnq = sdata->stxnq; - /* Give the sbuproxy a unique workbase id and its own workbase list - * and lock */ - randomiser = ((int64_t)time(NULL)) << 32; - dsdata->blockchange_id = dsdata->workbase_id = randomiser; + /* Give the sbuproxy its own workbase list and lock */ cklock_init(&dsdata->workbase_lock); return dsdata; } @@ -1770,7 +1766,7 @@ static void stratum_broadcast(sdata_t *sdata, json_t *val) ssends = sdata->ssends; - mutex_lock(sdata->ssends->lock); + mutex_lock(ssends->lock); if (ssends->msgs) DL_CONCAT(ssends->msgs, bulk_send); else