diff --git a/pool/page.php b/pool/page.php index a8750b86..e680f385 100644 --- a/pool/page.php +++ b/pool/page.php @@ -199,7 +199,18 @@ function pgtop($dotop, $user, $douser) } if (isset($info['blockacc'])) - $pac = number_format($info['blockacc'], 0); + { + $acc = $info['blockacc']; + $pac = number_format($acc, 0); + if ($acc >= 1000000) + $pac .= ' '.siprefmt($acc); + if (isset($info['currndiff'])) + { + $cur = $info['currndiff']; + if ($cur != '?' && $cur > 0.0) + $pac .= ' ('.number_format(100.0*$acc/$cur, 2).'%)'; + } + } if (isset($info['blockerr'])) $per = number_format($info['blockerr'], 0); diff --git a/src/ckdb.c b/src/ckdb.c index 4e9fe88a..21670485 100644 --- a/src/ckdb.c +++ b/src/ckdb.c @@ -4976,15 +4976,15 @@ flail: else { char pct[16] = "?"; char est[16] = ""; - - if (pool.diffacc) { - K_ITEM *w_item; - w_item = find_workinfo(DATA_BLOCKS(b_item)->workinfoid); - if (w_item) { - char wdiffbin[TXT_SML+1]; - double wdiff; - hex2bin(wdiffbin, DATA_WORKINFO(w_item)->bits, 4); - wdiff = diff_from_nbits(wdiffbin); + K_ITEM *w_item; + + w_item = find_workinfo(DATA_BLOCKS(b_item)->workinfoid); + if (w_item) { + char wdiffbin[TXT_SML+1]; + double wdiff; + hex2bin(wdiffbin, DATA_WORKINFO(w_item)->bits, 4); + wdiff = diff_from_nbits(wdiffbin); + if (wdiff > 0.0) { snprintf(pct, sizeof(pct), "%.2f", 100.0 * pool.diffacc / wdiff); }