From f7f5b6dd7d0db9343c4a3e4250dd77ea46423e17 Mon Sep 17 00:00:00 2001 From: kanoi Date: Sat, 6 Aug 2016 22:19:59 +1000 Subject: [PATCH] php - add PPS% to Block Statistics --- pool/page_blocks.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pool/page_blocks.php b/pool/page_blocks.php index c21d0e0c..1affd737 100644 --- a/pool/page_blocks.php +++ b/pool/page_blocks.php @@ -99,6 +99,13 @@ function doblocks($data, $user) $pg .= "Mean%"; $pg .= "CDF[Erl]"; $pg .= "Luck%"; + + $tt = ""; + $tt .= '?'; + $tt .= ""; + $tt .= "Pool PPS%: MeanTx% * Luck% minus the pool fee"; + + $pg .= "${tt}PPS%"; $pg .= "\n"; $since = $data['info']['lastblock']; @@ -124,6 +131,9 @@ function doblocks($data, $user) $luck = number_format(100 * $ans['s_luck:'.$i], 2); $txm = number_format(100 * $ans['s_txmean:'.$i], 1); + $poolfee = 0.9; # pool fee as a % out of 100 + $o = number_format((100 - $poolfee) * $ans['s_txmean:'.$i] / $ans['s_diffmean:'.$i], 2); + $pg .= ""; $pg .= "$desc Blocks"; $pg .= "$age"; @@ -132,6 +142,7 @@ function doblocks($data, $user) $pg .= "$mean%"; $pg .= "$cdferldsp"; $pg .= "$luck%"; + $pg .= "$o%"; $pg .= "\n"; } $pg .= "\n";