Browse Source

Move block hash update display to add base for notify enabled btcds

master
Con Kolivas 10 years ago
parent
commit
6bd4ed66bd
  1. 6
      src/stratifier.c

6
src/stratifier.c

@ -564,6 +564,7 @@ static void add_base(ckpool_t *ckp, workbase_t *wb, bool *new_block)
hex2bin(bin, lasthash, 32); hex2bin(bin, lasthash, 32);
swap_256(swap, bin); swap_256(swap, bin);
__bin2hex(lastswaphash, swap, 32); __bin2hex(lastswaphash, swap, 32);
LOGNOTICE("Block hash changed to %s", lastswaphash);
blockchange_id = wb->id; blockchange_id = wb->id;
} }
if (*new_block && ckp->logshares) { if (*new_block && ckp->logshares) {
@ -1212,10 +1213,9 @@ static void *blockupdate(void *arg)
buf = send_recv_generator(ckp, request, GEN_LAX); buf = send_recv_generator(ckp, request, GEN_LAX);
if (buf && cmdmatch(buf, "notify")) if (buf && cmdmatch(buf, "notify"))
cksleep_ms(5000); cksleep_ms(5000);
else if (buf && strcmp(buf, lastswaphash) && !cmdmatch(buf, "failed")) { else if (buf && strcmp(buf, lastswaphash) && !cmdmatch(buf, "failed"))
LOGNOTICE("Block hash changed to %s", buf);
update_base(ckp, GEN_PRIORITY); update_base(ckp, GEN_PRIORITY);
} else else
cksleep_ms(ckp->blockpoll); cksleep_ms(ckp->blockpoll);
} }
return NULL; return NULL;

Loading…
Cancel
Save