Merge branch 'next' into issue-145
This commit is contained in:
commit
04786aafb5
6
POOLS.md
6
POOLS.md
@ -117,3 +117,9 @@ Small Time Miners are running various stratum only pools for different coins.
|
|||||||
| Pool URL | Coin | Avg. Hashrate | Avg. Active Workers | Notes |
|
| Pool URL | Coin | Avg. Hashrate | Avg. Active Workers | Notes |
|
||||||
| -------- | ---- | ------------: | ------------------: | ----- |
|
| -------- | ---- | ------------: | ------------------: | ----- |
|
||||||
| http://poolmine.it | Litecoin | 0.23 MHash | 5 | PPLNS, Custom Template |
|
| http://poolmine.it | Litecoin | 0.23 MHash | 5 | PPLNS, Custom Template |
|
||||||
|
|
||||||
|
### 4782
|
||||||
|
|
||||||
|
| Pool URL | Coin | Avg. Hashrate | Avg. Active Workers | Notes |
|
||||||
|
| -------- | ---- | ------------: | ------------------: | ----- |
|
||||||
|
| http://pirate-pool.com | LTC | 0.5 MHash | 2 | |
|
||||||
|
|||||||
@ -23,6 +23,10 @@ I was hoping to keep this out of the README but apparently people remove or chan
|
|||||||
at the bottom of the page. For those of you finding my project and are willing to appreciate the work
|
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`
|
with some hard earned LTC feel free to donate to my LTC address: `Lge95QR2frp9y1wJufjUPCycVsg5gLJPW8`
|
||||||
|
|
||||||
|
# Website Footer
|
||||||
|
|
||||||
|
When you decide to use `mmcfe-ng` please be so kind and leave the footer intact. You are not the author of the software and should honor those that have worked on it. I don't mind changing the LTC donation address at the bottom, but keep in mind who really wrote this software and would deserve those ;-).
|
||||||
|
|
||||||
Donors
|
Donors
|
||||||
======
|
======
|
||||||
|
|
||||||
|
|||||||
@ -102,6 +102,27 @@ $aSettings['statistics'][] = array(
|
|||||||
'name' => 'statistics_block_count', 'value' => $setting->getValue('statistics_block_count'),
|
'name' => 'statistics_block_count', 'value' => $setting->getValue('statistics_block_count'),
|
||||||
'tooltip' => 'Blocks to fetch for the block statistics page.'
|
'tooltip' => 'Blocks to fetch for the block statistics page.'
|
||||||
);
|
);
|
||||||
|
$aSettings['statistics'][] = array(
|
||||||
|
'display' => 'Pool Hashrate Modifier', 'type' => 'select',
|
||||||
|
'options' => array( '1' => 'KH/s', '0.001' => 'MH/s', '0.000001' => 'GH/s' ),
|
||||||
|
'default' => '1',
|
||||||
|
'name' => 'statistics_pool_hashrate_modifier', 'value' => $setting->getValue('statistics_pool_hashrate_modifier'),
|
||||||
|
'tooltip' => 'Auto-adjust displayed pool hashrates to a certain limit.'
|
||||||
|
);
|
||||||
|
$aSettings['statistics'][] = array(
|
||||||
|
'display' => 'Network Hashrate Modifier', 'type' => 'select',
|
||||||
|
'options' => array( '1' => 'KH/s', '0.001' => 'MH/s', '0.000001' => 'GH/s' ),
|
||||||
|
'default' => '1',
|
||||||
|
'name' => 'statistics_network_hashrate_modifier', 'value' => $setting->getValue('statistics_network_hashrate_modifier'),
|
||||||
|
'tooltip' => 'Auto-adjust displayed network hashrates to a certain limit.'
|
||||||
|
);
|
||||||
|
$aSettings['statistics'][] = array(
|
||||||
|
'display' => 'Personal Hashrate Modifier', 'type' => 'select',
|
||||||
|
'options' => array( '1' => 'KH/s', '0.001' => 'MH/s', '0.000001' => 'GH/s' ),
|
||||||
|
'default' => '1',
|
||||||
|
'name' => 'statistics_personal_hashrate_modifier', 'value' => $setting->getValue('statistics_personal_hashrate_modifier'),
|
||||||
|
'tooltip' => 'Auto-adjust displayed personal hashrates to a certain limit.'
|
||||||
|
);
|
||||||
$aSettings['acl'][] = array(
|
$aSettings['acl'][] = array(
|
||||||
'display' => 'Pool Statistics', 'type' => 'select',
|
'display' => 'Pool Statistics', 'type' => 'select',
|
||||||
'options' => array( 0 => 'Private', 1 => 'Public'),
|
'options' => array( 0 => 'Private', 1 => 'Public'),
|
||||||
|
|||||||
@ -78,9 +78,9 @@ $config['wallet']['password'] = 'testnet';
|
|||||||
* currency = `BTC`
|
* currency = `BTC`
|
||||||
*
|
*
|
||||||
* Optional (cryptsy.com):
|
* Optional (cryptsy.com):
|
||||||
* url = `https://www.cryptsy.com`
|
* url = `http://pubapi.cryptsy.com`
|
||||||
* target = `/api.php?method=marketdata`
|
|
||||||
* currency = `BTC`
|
* currency = `BTC`
|
||||||
|
* target = `/api.php?method=marketdata`
|
||||||
**/
|
**/
|
||||||
$config['price']['url'] = 'https://btc-e.com';
|
$config['price']['url'] = 'https://btc-e.com';
|
||||||
$config['price']['target'] = '/api/2/ltc_usd/ticker';
|
$config['price']['target'] = '/api/2/ltc_usd/ticker';
|
||||||
|
|||||||
@ -25,7 +25,8 @@ if (!$smarty->isCached('master.tpl', $smarty_cache_key)) {
|
|||||||
$_SESSION['POPUP'][] = array('CONTENT' => 'Unable to connect to wallet RPC service: ' . $bitcoin->can_connect(), 'TYPE' => 'errormsg');
|
$_SESSION['POPUP'][] = array('CONTENT' => 'Unable to connect to wallet RPC service: ' . $bitcoin->can_connect(), 'TYPE' => 'errormsg');
|
||||||
}
|
}
|
||||||
// Fetch unconfirmed amount from blocks table
|
// Fetch unconfirmed amount from blocks table
|
||||||
$aBlocksUnconfirmed = $block->getAllUnconfirmed();
|
empty($config['network_confirmations']) ? $confirmations = 120 : $confirmations = $config['network_confirmations'];
|
||||||
|
$aBlocksUnconfirmed = $block->getAllUnconfirmed($confirmations);
|
||||||
$dBlocksUnconfirmedBalance = 0;
|
$dBlocksUnconfirmedBalance = 0;
|
||||||
if (!empty($aBlocksUnconfirmed))
|
if (!empty($aBlocksUnconfirmed))
|
||||||
foreach ($aBlocksUnconfirmed as $aData) $dBlocksUnconfirmedBalance += $aData['amount'];
|
foreach ($aBlocksUnconfirmed as $aData) $dBlocksUnconfirmedBalance += $aData['amount'];
|
||||||
|
|||||||
@ -15,7 +15,7 @@ $bitcoin->can_connect() === true ? $dNetworkHashrate = $bitcoin->query('getnetwo
|
|||||||
|
|
||||||
echo json_encode(
|
echo json_encode(
|
||||||
array(
|
array(
|
||||||
'pool_name' => $config['website']['name'],
|
'pool_name' => $setting->getValue('website_name'),
|
||||||
'hashrate' => $statistics->getCurrentHashrate(),
|
'hashrate' => $statistics->getCurrentHashrate(),
|
||||||
'workers' => $worker->getCountAllActiveWorkers(),
|
'workers' => $worker->getCountAllActiveWorkers(),
|
||||||
'shares_this_round' => $aShares['valid'],
|
'shares_this_round' => $aShares['valid'],
|
||||||
|
|||||||
@ -19,21 +19,45 @@ if ($bitcoin->can_connect() === true) {
|
|||||||
$dDifficulty = $bitcoin->query('getdifficulty');
|
$dDifficulty = $bitcoin->query('getdifficulty');
|
||||||
if (is_array($dDifficulty) && array_key_exists('proof-of-work', $dDifficulty))
|
if (is_array($dDifficulty) && array_key_exists('proof-of-work', $dDifficulty))
|
||||||
$dDifficulty = $dDifficulty['proof-of-work'];
|
$dDifficulty = $dDifficulty['proof-of-work'];
|
||||||
|
try { $dNetworkHashrate = $bitcoin->query('getnetworkhashps') / 1000; } catch (Exception $e) {
|
||||||
|
// Maybe we are SHA
|
||||||
|
try { $dNetworkHashrate = $bitcoin->query('gethashespersec') / 1000; } catch (Exception $e) {
|
||||||
|
$dNetworkHashrate = 0;
|
||||||
|
}
|
||||||
|
$dNetworkHashrate = 0;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$dNetworkHashrate = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Always fetch this since we need for ministats header
|
// Baseline pool hashrate for templates
|
||||||
$bitcoin->can_connect() === true ? $dNetworkHashrate = $bitcoin->query('getnetworkhashps') : $dNetworkHashrate = 0;
|
if ( ! $dPoolHashrateModifier = $setting->getValue('statistics_pool_hashrate_modifier') ) $dPoolHashrateModifier = 1;
|
||||||
|
|
||||||
// Fetch some data
|
|
||||||
if (!$iCurrentActiveWorkers = $worker->getCountAllActiveWorkers()) $iCurrentActiveWorkers = 0;
|
|
||||||
$iCurrentPoolHashrate = $statistics->getCurrentHashrate();
|
$iCurrentPoolHashrate = $statistics->getCurrentHashrate();
|
||||||
$iCurrentPoolShareRate = $statistics->getCurrentShareRate();
|
|
||||||
|
|
||||||
// Avoid confusion, ensure our nethash isn't higher than poolhash
|
// Avoid confusion, ensure our nethash isn't higher than poolhash
|
||||||
if ($iCurrentPoolHashrate > $dNetworkHashrate) $dNetworkHashrate = $iCurrentPoolHashrate;
|
if ($iCurrentPoolHashrate > $dNetworkHashrate) $dNetworkHashrate = $iCurrentPoolHashrate;
|
||||||
|
|
||||||
|
// Baseline network hashrate for templates
|
||||||
|
if ( ! $dPersonalHashrateModifier = $setting->getValue('statistics_personal_hashrate_modifier') ) $dPersonalHashrateModifier = 1;
|
||||||
|
if ( ! $dNetworkHashrateModifier = $setting->getValue('statistics_network_hashrate_modifier') ) $dNetworkHashrateModifier = 1;
|
||||||
|
|
||||||
|
// Apply modifier now
|
||||||
|
$dNetworkHashrate = $dNetworkHashrate * $dNetworkHashrateModifier;
|
||||||
|
$iCurrentPoolHashrate = $iCurrentPoolHashrate * $dPoolHashrateModifier;
|
||||||
|
|
||||||
|
// Share rate of the entire pool
|
||||||
|
$iCurrentPoolShareRate = $statistics->getCurrentShareRate();
|
||||||
|
|
||||||
|
// Active workers
|
||||||
|
if (!$iCurrentActiveWorkers = $worker->getCountAllActiveWorkers()) $iCurrentActiveWorkers = 0;
|
||||||
|
|
||||||
|
// Small helper array
|
||||||
|
$aHashunits = array( '1' => 'KH/s', '0.001' => 'MH/s', '0.000001' => 'GH/s' );
|
||||||
|
|
||||||
// Global data for Smarty
|
// Global data for Smarty
|
||||||
$aGlobal = array(
|
$aGlobal = array(
|
||||||
|
'hashunits' => array( 'pool' => $aHashunits[$dPoolHashrateModifier], 'network' => $aHashunits[$dNetworkHashrateModifier], 'personal' => $aHashunits[$dPersonalHashrateModifier]),
|
||||||
|
'hashmods' => array( 'personal' => $dPersonalHashrateModifier ),
|
||||||
'hashrate' => $iCurrentPoolHashrate,
|
'hashrate' => $iCurrentPoolHashrate,
|
||||||
'nethashrate' => $dNetworkHashrate,
|
'nethashrate' => $dNetworkHashrate,
|
||||||
'sharerate' => $iCurrentPoolShareRate,
|
'sharerate' => $iCurrentPoolShareRate,
|
||||||
@ -101,7 +125,7 @@ if (@$_SESSION['USERDATA']['id']) {
|
|||||||
|
|
||||||
// Other userdata that we can cache savely
|
// Other userdata that we can cache savely
|
||||||
$aGlobal['userdata']['shares'] = $statistics->getUserShares($_SESSION['USERDATA']['id']);
|
$aGlobal['userdata']['shares'] = $statistics->getUserShares($_SESSION['USERDATA']['id']);
|
||||||
$aGlobal['userdata']['hashrate'] = $statistics->getUserHashrate($_SESSION['USERDATA']['id']);
|
$aGlobal['userdata']['hashrate'] = $statistics->getUserHashrate($_SESSION['USERDATA']['id']) * $dPersonalHashrateModifier;
|
||||||
$aGlobal['userdata']['sharerate'] = $statistics->getUserSharerate($_SESSION['USERDATA']['id']);
|
$aGlobal['userdata']['sharerate'] = $statistics->getUserSharerate($_SESSION['USERDATA']['id']);
|
||||||
|
|
||||||
switch ($config['payout_system']) {
|
switch ($config['payout_system']) {
|
||||||
|
|||||||
@ -5,8 +5,8 @@
|
|||||||
<table border="0">
|
<table border="0">
|
||||||
<tr>
|
<tr>
|
||||||
{if $GLOBAL.config.price.currency}<td><li>{$GLOBAL.config.currency}/{$GLOBAL.config.price.currency}: {$GLOBAL.price|default:"0"|number_format:"4"} </li></td>{/if}
|
{if $GLOBAL.config.price.currency}<td><li>{$GLOBAL.config.currency}/{$GLOBAL.config.price.currency}: {$GLOBAL.price|default:"0"|number_format:"4"} </li></td>{/if}
|
||||||
<td><li>Network Hashrate: {($GLOBAL.nethashrate / 1000 / 1000 )|default:"0"|number_format:"3"} MH/s </li></td>
|
<td><li>Network Hashrate: {$GLOBAL.nethashrate|default:"0"|number_format:"3"} {$GLOBAL.hashunits.network} </li></td>
|
||||||
<td><li>Pool Hashrate: {($GLOBAL.hashrate / 1000)|number_format:"3"} MH/s </li></td>
|
<td><li>Pool Hashrate: {$GLOBAL.hashrate|number_format:"3"} {$GLOBAL.hashunits.pool} </li></td>
|
||||||
<td><li>Pool Sharerate: {$GLOBAL.sharerate|number_format:"2"} Shares/s </li></td>
|
<td><li>Pool Sharerate: {$GLOBAL.sharerate|number_format:"2"} Shares/s </li></td>
|
||||||
<td><li>Pool Workers: {$GLOBAL.workers|default:"0"} </li></td>
|
<td><li>Pool Workers: {$GLOBAL.workers|default:"0"} </li></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@ -16,7 +16,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><b>Hashrate</b></td>
|
<td><b>Hashrate</b></td>
|
||||||
<td class="right">{$GLOBAL.userdata.hashrate|number_format} KH/s</td>
|
<td class="right">{$GLOBAL.userdata.hashrate|number_format:"2"} {$GLOBAL.hashunits.personal}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><b>Share Rate</b></td>
|
<td><b>Share Rate</b></td>
|
||||||
|
|||||||
@ -11,7 +11,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><b>Hashrate</b></td>
|
<td><b>Hashrate</b></td>
|
||||||
<td class="right">{$GLOBAL.userdata.hashrate|number_format} KH/s</td>
|
<td class="right">{$GLOBAL.userdata.hashrate|number_format:"2"} {$GLOBAL.hashunits.personal}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><b>Share Rate</b></td>
|
<td><b>Share Rate</b></td>
|
||||||
|
|||||||
@ -11,7 +11,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><b>Hashrate</b></td>
|
<td><b>Hashrate</b></td>
|
||||||
<td class="right">{$GLOBAL.userdata.hashrate|number_format} KH/s</td>
|
<td class="right">{$GLOBAL.userdata.hashrate|number_format:"2"} {$GLOBAL.hashunits.personal}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><b>Share Rate</b></td>
|
<td><b>Share Rate</b></td>
|
||||||
|
|||||||
@ -9,7 +9,7 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="leftheader">Pool Hash Rate</td>
|
<td class="leftheader">Pool Hash Rate</td>
|
||||||
<td>{($GLOBAL.hashrate / 1000)|number_format:"3"} Mhash/s</td>
|
<td>{$GLOBAL.hashrate|number_format:"3"} {$GLOBAL.hashunits.pool}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="leftheader">Pool Efficiency</td>
|
<td class="leftheader">Pool Efficiency</td>
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
<tr style="background-color:#B6DAFF;">
|
<tr style="background-color:#B6DAFF;">
|
||||||
<th align="left">Rank</th>
|
<th align="left">Rank</th>
|
||||||
<th align="left" scope="col">User Name</th>
|
<th align="left" scope="col">User Name</th>
|
||||||
<th class="right" scope="col">KH/s</th>
|
<th class="right" scope="col">{$GLOBAL.hashunits.personal}</th>
|
||||||
<th class="right">{$GLOBAL.config.currency}/Day</th>
|
<th class="right">{$GLOBAL.config.currency}/Day</th>
|
||||||
{if $GLOBAL.config.price.currency}<th class="right">{$GLOBAL.config.price.currency}/Day</th>{/if}
|
{if $GLOBAL.config.price.currency}<th class="right">{$GLOBAL.config.price.currency}/Day</th>{/if}
|
||||||
</tr>
|
</tr>
|
||||||
@ -18,7 +18,7 @@
|
|||||||
<tr{if $GLOBAL.userdata.username == $CONTRIBHASHES[contrib].account}{assign var=listed value=1} style="background-color:#99EB99;"{else} class="{cycle values="odd,even"}"{/if}>
|
<tr{if $GLOBAL.userdata.username == $CONTRIBHASHES[contrib].account}{assign var=listed value=1} style="background-color:#99EB99;"{else} class="{cycle values="odd,even"}"{/if}>
|
||||||
<td>{$rank++}</td>
|
<td>{$rank++}</td>
|
||||||
<td>{if $CONTRIBHASHES[contrib].is_anonymous|default:"0" == 1}anonymous{else}{$CONTRIBHASHES[contrib].account|escape}{/if}</td>
|
<td>{if $CONTRIBHASHES[contrib].is_anonymous|default:"0" == 1}anonymous{else}{$CONTRIBHASHES[contrib].account|escape}{/if}</td>
|
||||||
<td class="right">{$CONTRIBHASHES[contrib].hashrate|number_format}</td>
|
<td class="right">{($CONTRIBHASHES[contrib].hashrate * $GLOBAL.hashmods.personal)|number_format:"2"}</td>
|
||||||
<td class="right">{$estday|number_format:"3"}</td>
|
<td class="right">{$estday|number_format:"3"}</td>
|
||||||
{if $GLOBAL.config.price.currency}<td class="right">{($estday * $GLOBAL.price)|default:"n/a"|number_format:"2"}</td>{/if}
|
{if $GLOBAL.config.price.currency}<td class="right">{($estday * $GLOBAL.price)|default:"n/a"|number_format:"2"}</td>{/if}
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user