Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Merge remote-tracking branch 'origin/development' into nightly

  • Loading branch information...
Stoyvo committed Apr 14, 2015
2 parents dc9a172 + b9b0ba3 commit eb4a1f6805360ef4efa708b4eb2442012f15f3b0
@@ -1,15 +1,26 @@

[ v2.0.2.799 ]
[ v2.0.2.805 ]

FEATURES
========
- Pools have Offline mode. If no data is returned, or fails to connect, it is "offline"

HOTFIXES
========
- MobileMiner swapped the api key and app key
- fixed line-endings for permissionfix.sh

KNOWN ISSUES
============
- Miner Failover may report incorrect active pool
- Wallets can take a long time to load
- Pools do not show an offline mode

---

[ v2.0.2.799 ]

HOTFIXES
========
- MobileMiner swapped the api key and app key

---

@@ -1389,6 +1389,9 @@ a#dash-add-panel.flash {
text-align: center;
clear: both;
}
.panel-offline .panel-body {
padding: 0px;
}

.full-content .panel-body {
font-size: 18px;
@@ -57,6 +57,11 @@ public function update() {
$poolData[$action] = $poolData[$action]['data'];
}
// Offline Check
if (empty($poolData[$this->_actions[0]])) {
return;
}
// Data Order
$data['type'] = $this->_type;
@@ -43,6 +43,11 @@ public function update() {
}
}
// Offline Check
if (empty($poolData[$this->_actions[0]])) {
return;
}
// Data Order
$data['type'] = $this->_type;
@@ -22,6 +22,12 @@ public function update() {
$poolData['global'] = curlCall($this->_apiURL . '/api/pool/stats');
$poolData['user'] = curlCall($this->_apiURL . '/api/users/'.$this->_userId.'?key='. $this->_apiKey);
// Offline Check
if (empty($poolData['global']) || empty($poolData['user'])) {
return;
}
// Payout Information
$data['type'] = $this->_type;
@@ -20,6 +20,11 @@ public function update() {
$poolData = curlCall($this->_apiURL . '/api.php?api_key='. $this->_apiKey);
// Offline Check
if (empty($poolData)) {
return;
}
// Data Order
$data['type'] = $this->_type;
@@ -20,6 +20,11 @@ public function update() {
$poolData = array();
$poolData = curlCall($this->_apiURL . '?accountId='.$this->_userId);
// Offline Check
if (empty($poolData)) {
return;
}
// Data Order
$data['type'] = $this->_type;
@@ -23,6 +23,11 @@ public function update() {
$poolData['user'] = curlCall($this->_apiURL . '/index.php?k=api&json=y&username='.$this->_userId.'&api='.$this->_apiKey);
$poolData['workers'] = curlCall($this->_apiURL . '/index.php?k=api&json=y&work=y&username='.$this->_userId.'&api='.$this->_apiKey);
// Offline Check
if (empty($poolData['user']) || empty($poolData['workers'])) {
return;
}
// Data Order
$data['type'] = $this->_type;
@@ -8,13 +8,13 @@ class Pools_Eclipse extends Pools_Abstract {
// Pool Information
protected $_apiKey;
protected $_type = 'eclipse';
// api calls to make
protected $_actions = array(
'poolstats',
'userstats',
);
public function __construct($params) {
parent::__construct(array('apiurl' => 'https://eclipsemc.com'));
// https://eclipsemc.com
@@ -28,18 +28,23 @@ public function update() {
foreach ($this->_actions as $action) {
$poolData[$action] = curlCall($this->_apiURL . '/api.php?key='.$this->_apiKey.'&action='. $action);
}
// Offline Check
if (empty($poolData[$this->_actions[0]])) {
return;
}
// Data Order
$data['type'] = $this->_type;
$data['total_sent'] = $poolData['userstats']['data']['user']['total_payout'];
$data['balance'] = $poolData['userstats']['data']['user']['confirmed_rewards'];
$data['unconfirmed_balance'] = $poolData['userstats']['data']['user']['unconfirmed_rewards'];
$data['estimated_rewards'] = $poolData['userstats']['data']['user']['estimated_rewards'];
$data['pool_hashrate'] = $poolData['poolstats']['hashrate'];
$data['user_hashrate'] = 0;
$speedMultiplier = array(
'GH/s' => 1000,
@@ -52,21 +57,21 @@ public function update() {
$data['user_hashrate'] += $hashrate * $speedMultiplier[$hashspeed];
}
}
$data['user_hashrate'] = formatHashRate($data['user_hashrate']*1000);
$data['pool_workers'] = $poolData['poolstats']['active_workers'];
// how to get active user workers and total hashrate?
$data['time_since_last_block'] = $poolData['poolstats']['round_duration']; // Would love to format this one day
// $data['time_since_last_block'] = formatTimeElapsed(); // how to format? 00:52:44
$data['url'] = $this->_apiURL;
$this->_fileHandler->write(json_encode($data));
return $data;
}
return json_decode($this->_fileHandler->read(), true);
}
@@ -42,6 +42,11 @@ public function update() {
$poolData[$action] = curlCall($this->_apiURL . '/api.php?cmd='.$actionParam);
}
// Offline Check
if (empty($poolData[$this->_actions[0]])) {
return;
}
// Data Order
$data['type'] = $this->_type;
@@ -8,7 +8,7 @@ class Pools_MagicPool extends Pools_Abstract {
// Pool Information
protected $_btcaddess;
protected $_type = 'magicpool';
public function __construct($params) {
parent::__construct(array('apiurl' => 'https://magicpool.org'));
$this->_btcaddess = $params['address'];
@@ -19,25 +19,30 @@ public function update() {
if ($GLOBALS['cached'] == false || $this->_fileHandler->lastTimeModified() >= 30) { // updates every 30 seconds
$poolData['pool'] = curlCall($this->_apiURL . '/api.php');
$poolData['user'] = curlCall($this->_apiURL . '/api.php?user='.$this->_btcaddess);
// Offline Check
if (empty($poolData['pool']) || empty($poolData['user'])) {
return;
}
// Data Order
$data['type'] = $this->_type;
$data['total_paid'] = number_format($poolData['user']['totalPaid'], 8);
$data['balance'] = number_format($poolData['user']['pending'], 8);
$data['profitability_(BTC/MHs/day)'] = number_format($poolData['user']['lastProf'], 8);
$data['pool_hashrate'] = formatHashrate($poolData['pool']['poolhashrate']*1000);
$data['user_hashrate'] = formatHashrate($poolData['user']['hashrate']*1000);
$data['url'] = $this->_apiURL;
$this->_fileHandler->write(json_encode($data));
return $data;
}
return json_decode($this->_fileHandler->read(), true);
}
@@ -43,6 +43,11 @@ public function update() {
}
}
// Offline Check
if (empty($poolData[$this->_actions[0]])) {
return;
}
// Data Order
$data['type'] = $this->_type;
@@ -20,9 +20,15 @@ public function update() {
if ($GLOBALS['cached'] == false || $this->_fileHandler->lastTimeModified() >= 30) { // updates every 30 seconds
$poolData = curlCall($this->_apiURL . '?api_key='. $this->_apiKey);
// Offline Check
if (empty($poolData)) {
return;
}
// Payout Information
$data['type'] = $this->_type;
$poolHashrate = 0;
$userHashrate = 0;
foreach ($poolData['currency'] as $coin => $values) {
@@ -41,10 +47,10 @@ public function update() {
}
$poolHashrate += $values['pool_hashrate'];
}
$data['pool_hashrate'] = $poolHashrate;
$data['user_hashrate'] = $userHashrate;
$userWorkers = array();
foreach ($poolData['workers'] as $coin => $workers) {
foreach ($workers as $name => $worker) {
@@ -56,20 +62,20 @@ public function update() {
}
}
}
foreach ($userWorkers as $name => $worker) {
$name = explode('.', $name);
$data['worker_'.$name[1]] = formatHashrate($worker);
}
$data['pool_hashrate'] = formatHashrate($data['pool_hashrate']);
$data['user_hashrate'] = formatHashrate($data['user_hashrate']);
$data['url_name'] = 'https://multipool.us';
$data['url'] = 'https://multipool.us/';
$this->_fileHandler->write(json_encode($data));
return $data;
}
@@ -59,6 +59,12 @@ public function update() {
$poolData['user'] = curlCall($this->_apiURL . '/api?method=stats.provider&addr='. $this->_btcaddess);
$poolData['global'] = curlCall($this->_apiURL . '/api?method=stats.global.current');
// Offline Check
if (empty($poolData['user']) || empty($poolData['global'])) {
return;
}
$algoNetSpeed = array();
foreach ($poolData['global']['result']['stats'] as $values) {
$algoNetSpeed[$values['algo']] = $values['speed'];
@@ -22,6 +22,12 @@ public function update() {
$poolData = array();
$poolData = curlCall($this->_apiURL . '/api/stats');
// Offline Check
if (empty($poolData)) {
return;
}
if (empty($this->_coin)) {
$this->findCoin($poolData);
}
@@ -29,6 +29,11 @@ public function update() {
foreach ($this->_actions as $action) {
$poolData[$action] = curlCall($this->_apiURL . '/' . $action);
}
// Offline Check
if (empty($poolData[$this->_actions[0]])) {
return;
}
// Data Order
$data['type'] = $this->_type;

0 comments on commit eb4a1f6

Please sign in to comment.
You can’t perform that action at this time.