From e0d1ef62331c5394f85ae966a2eeb9e1e6abbf54 Mon Sep 17 00:00:00 2001 From: kanoi Date: Thu, 28 Aug 2014 20:59:39 +1000 Subject: [PATCH] php - add avg hashrate --- pool/page_pplns.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pool/page_pplns.php b/pool/page_pplns.php index d6c98952..9ba223dc 100644 --- a/pool/page_pplns.php +++ b/pool/page_pplns.php @@ -91,18 +91,21 @@ Block: $pg .= 'Diff Accepted'; $pg .= '%'; $pg .= 'Base BTC'; + $pg .= 'Avg Hashrate'; $pg .= "\n"; $diffacc_total = $ans['diffacc_total']; if ($diffacc_total == 0) $diffacc_total = pow(10,15); - $reward = 1.0 * $ans['block_reward'] / pow(10,8); + $reward = $ans['block_reward'] / pow(10,8); + $elapsed = $ans['pplns_elapsed']; $count = $ans['rows']; for ($i = 1; $i <= $count; $i++) { $diffacc_user = $ans['diffacc_user'.$i]; $diffacc_percent = number_format(100.0 * $diffacc_user / $diffacc_total, 2).'%'; $diffacc_btc = number_format($reward * $diffacc_user / $diffacc_total, 8); + $avg_hash = number_format($diffacc_user / $elapsed * pow(2,32), 0); if (($i % 2) == 0) $row = 'even'; @@ -114,6 +117,7 @@ Block: $pg .= "$diffacc_user"; $pg .= "$diffacc_percent"; $pg .= "$diffacc_btc"; + $pg .= "$avg_hash"; $pg .= "\n"; } $pg .= "\n";