diff --git a/README.md b/README.md
index 6d3dd879..69a0e8ec 100644
--- a/README.md
+++ b/README.md
@@ -16,6 +16,13 @@ future.
I do not recommend using this for a live setup as of yet. Wait for the later Release Candidate
if you wish to run your pool with it. Testing pools are much appreciated though!
+Donations
+=========
+
+I was hoping to keep this out of the README but apparently people remove or change the LTC address
+at the bottom of the page. For those of you finding my project and are willing to appreciate the work
+with some hard earned LTC feel free to donate to my LTC address: `Lge95QR2frp9y1wJufjUPCycVsg5gLJPW8`
+
Requirements
============
diff --git a/public/include/classes/worker.class.php b/public/include/classes/worker.class.php
index b2039dd4..85254900 100644
--- a/public/include/classes/worker.class.php
+++ b/public/include/classes/worker.class.php
@@ -8,11 +8,12 @@ class Worker {
private $sError = '';
private $table = 'workers';
- public function __construct($debug, $mysqli, $user, $share) {
+ public function __construct($debug, $mysqli, $user, $share, $config) {
$this->debug = $debug;
$this->mysqli = $mysqli;
$this->user = $user;
$this->share = $share;
+ $this->config = $config;
$this->debug->append("Instantiated Worker class", 2);
}
@@ -63,7 +64,7 @@ class Worker {
$stmt = $this->mysqli->prepare("
SELECT id, username, password,
( SELECT SIGN(COUNT(id)) FROM " . $this->share->getTableName() . " WHERE username = $this->table.username AND time > DATE_SUB(now(), INTERVAL 10 MINUTE)) AS active,
- ( SELECT ROUND(COUNT(id) * POW(2,21)/600/1000) FROM " . $this->share->getTableName() . " WHERE username = $this->table.username AND time > DATE_SUB(now(), INTERVAL 10 MINUTE)) AS hashrate
+ ( SELECT ROUND(COUNT(id) * POW(2, " . $this->config['difficulty'] . ")/600/1000) FROM " . $this->share->getTableName() . " WHERE username = $this->table.username AND time > DATE_SUB(now(), INTERVAL 10 MINUTE)) AS hashrate
FROM $this->table
WHERE account_id = ?");
if ($this->checkStmt($stmt) && $stmt->bind_param('i', $account_id) && $stmt->execute() && $result = $stmt->get_result())
@@ -138,4 +139,4 @@ class Worker {
}
}
-$worker = new Worker($debug, $mysqli, $user, $share);
+$worker = new Worker($debug, $mysqli, $user, $share, $config);
diff --git a/public/templates/mmcFE/statistics/default.tpl b/public/templates/mmcFE/statistics/default.tpl
index 7c274cea..d1dfd202 100644
--- a/public/templates/mmcFE/statistics/default.tpl
+++ b/public/templates/mmcFE/statistics/default.tpl
@@ -15,7 +15,7 @@
- | {$CURRENTDIFFICULTY} |
+ {$DIFFICULTY} |
diff --git a/public/templates/mmcFE/statistics/pool/contributors_hashrate.tpl b/public/templates/mmcFE/statistics/pool/contributors_hashrate.tpl
index f9f9c27f..30dbf416 100644
--- a/public/templates/mmcFE/statistics/pool/contributors_hashrate.tpl
+++ b/public/templates/mmcFE/statistics/pool/contributors_hashrate.tpl
@@ -1,6 +1,6 @@
{include file="global/block_header.tpl" ALIGN="left" BLOCK_HEADER="Top Hashrate Contributers"}
-
+
| Rank |
@@ -11,16 +11,24 @@
{assign var=rank value=1}
+{assign var=listed value=0}
{section contrib $CONTRIBHASHES}
-
+
| {$rank++} |
{$CONTRIBHASHES[contrib].account} |
{$CONTRIBHASHES[contrib].hashrate|number_format} |
- {math equation="round(reward / ( diff * pow(2,32) / ( hashrate * 1000 ) / 3600 / 24),3)" diff=$DIFFICULTY reward=$REWARD hashrate=$CONTRIBHASHES[contrib].hashrate} |
+ {math equation="round(reward / ( diff * pow(2,32) / ( hashrate * 1000 ) / 3600 / 24), 3)" diff=$DIFFICULTY reward=$REWARD hashrate=$CONTRIBHASHES[contrib].hashrate} |
{/section}
+{if $listed != 1}
+
+ | n/a |
+ {$GLOBAL.userdata.username} |
+ {$GLOBAL.userdata.hashrate} |
+ {math equation="round(reward / ( diff * pow(2,32) / ( hashrate * 1000 ) / 3600 / 24), 3)" diff=$DIFFICULTY reward=$REWARD hashrate=$GLOBAL.userdata.hashrate} |
+
+{/if}
-
{include file="global/block_footer.tpl"}
diff --git a/public/templates/mmcFE/statistics/pool/contributors_shares.tpl b/public/templates/mmcFE/statistics/pool/contributors_shares.tpl
index 1214ef44..02f33283 100644
--- a/public/templates/mmcFE/statistics/pool/contributors_shares.tpl
+++ b/public/templates/mmcFE/statistics/pool/contributors_shares.tpl
@@ -1,6 +1,6 @@
{include file="global/block_header.tpl" ALIGN="right" BLOCK_HEADER="Top Share Contributers"}
-
+
| Rank |
@@ -10,15 +10,22 @@
{assign var=rank value=1}
+{assign var=listed value=0}
{section hashrate $CONTRIBSHARES}
-
+
| {$rank++} |
{$CONTRIBSHARES[hashrate].account} |
{$CONTRIBSHARES[hashrate].shares|number_format} |
{/section}
+{if $listed != 1}
+
+ | n/a |
+ {$GLOBAL.userdata.username} |
+ {$GLOBAL.userdata.shares.valid} |
+
+{/if}
-
{include file="global/block_footer.tpl"}
diff --git a/public/templates/mmcFE/statistics/pool/default.tpl b/public/templates/mmcFE/statistics/pool/default.tpl
index 7c274cea..d1dfd202 100644
--- a/public/templates/mmcFE/statistics/pool/default.tpl
+++ b/public/templates/mmcFE/statistics/pool/default.tpl
@@ -15,7 +15,7 @@
- | {$CURRENTDIFFICULTY} |
+ {$DIFFICULTY} |