Browse Source

ckdb - use new workinfo diff_target rather than recalc it

master
kanoi 9 years ago
parent
commit
42d0093503
  1. 2
      src/ckdb.h
  2. 9
      src/ckdb_dbio.c

2
src/ckdb.h

@ -55,7 +55,7 @@
#define DB_VLOCK "1"
#define DB_VERSION "1.0.4"
#define CKDB_VERSION DB_VERSION"-1.502"
#define CKDB_VERSION DB_VERSION"-1.503"
#define WHERE_FFL " - from %s %s() line %d"
#define WHERE_FFL_HERE __FILE__, __func__, __LINE__

9
src/ckdb_dbio.c

@ -5019,15 +5019,12 @@ flail:
blk = true;
w_item = find_workinfo(row->workinfoid, NULL);
if (w_item) {
char wdiffbin[TXT_SML+1];
double wdiff;
WORKINFO *workinfo;
DATA_WORKINFO(workinfo, w_item);
hex2bin(wdiffbin, workinfo->bits, 4);
wdiff = diff_from_nbits(wdiffbin);
if (wdiff > 0.0) {
if (workinfo->diff_target > 0.0) {
snprintf(pct, sizeof(pct), "%.2f",
100.0 * pool.diffacc / wdiff);
100.0 * pool.diffacc /
workinfo->diff_target);
}
}
if (pool.diffacc >= 1000.0) {

Loading…
Cancel
Save