From 4e6612be31035489050496b6e49efea318a51e66 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Mon, 26 Jan 2015 15:15:45 +1100 Subject: [PATCH] Move logging out of lock in add_base --- src/stratifier.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/stratifier.c b/src/stratifier.c index 28b1cb53..8952b228 100644 --- a/src/stratifier.c +++ b/src/stratifier.c @@ -697,7 +697,6 @@ static void add_base(ckpool_t *ckp, workbase_t *wb, bool *new_block) hex2bin(bin, sdata->lasthash, 32); swap_256(swap, bin); __bin2hex(sdata->lastswaphash, swap, 32); - LOGNOTICE("Block hash changed to %s", sdata->lastswaphash); sdata->blockchange_id = wb->id; } if (*new_block && ckp->logshares) { @@ -726,8 +725,10 @@ static void add_base(ckpool_t *ckp, workbase_t *wb, bool *new_block) sdata->current_workbase = wb; ck_wunlock(&sdata->workbase_lock); - if (*new_block) + if (*new_block) { + LOGNOTICE("Block hash changed to %s", sdata->lastswaphash); purge_share_hashtable(sdata, wb->id); + } send_workinfo(ckp, wb);