Skip to content

Commit 71b5258

Browse files
author
Sebastian Grewe
committed
Merge branch 'master' into development
2 parents 400a05b + 53533e4 commit 71b5258

File tree

4 files changed

+13
-8
lines changed

4 files changed

+13
-8
lines changed

include/classes/tools.class.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ private function getApiType($url) {
7777
return 'btce';
7878
} else if (preg_match('/cryptsy.com/', $url)) {
7979
return 'cryptsy';
80+
} else if (preg_match('/cryptopia.co.nz/', $url)) {
81+
return 'cryptopia';
8082
} else if (preg_match('/cryptorush.in/', $url)) {
8183
return 'cryptorush';
8284
} else if (preg_match('/mintpal.com/', $url)) {
@@ -114,6 +116,9 @@ public function getPrice() {
114116
case 'cryptsy':
115117
return @$aData['return']['markets'][$strCurrency]['lasttradeprice'];
116118
break;
119+
case 'cryptopia':
120+
return @$aData['Data']['LastPrice'];
121+
break;
117122
case 'cryptorush':
118123
return @$aData["$strCurrency/" . $this->config['price']['currency']]['last_trade'];
119124
break;

include/config/admin_settings.inc.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,21 +197,21 @@
197197
);
198198
$aSettings['statistics'][] = array(
199199
'display' => 'Pool Hashrate Modifier', 'type' => 'select',
200-
'options' => array( '1' => 'KH/s', '0.001' => 'MH/s', '0.000001' => 'GH/s', '0.000000001' => 'TH/s' ),
200+
'options' => array( '1' => 'KH/s', '0.001' => 'MH/s', '0.000001' => 'GH/s', '0.000000001' => 'TH/s', '0.000000000001' => 'PH/s', '0.000000000000001' => 'EH/s' ),
201201
'default' => '1',
202202
'name' => 'statistics_pool_hashrate_modifier', 'value' => $setting->getValue('statistics_pool_hashrate_modifier'),
203203
'tooltip' => 'Auto-adjust displayed pool hashrates to a certain limit.'
204204
);
205205
$aSettings['statistics'][] = array(
206206
'display' => 'Network Hashrate Modifier', 'type' => 'select',
207-
'options' => array( '1' => 'KH/s', '0.001' => 'MH/s', '0.000001' => 'GH/s', '0.000000001' => 'TH/s' ),
207+
'options' => array( '1' => 'KH/s', '0.001' => 'MH/s', '0.000001' => 'GH/s', '0.000000001' => 'TH/s', '0.000000000001' => 'PH/s', '0.000000000000001' => 'EH/s' ),
208208
'default' => '1',
209209
'name' => 'statistics_network_hashrate_modifier', 'value' => $setting->getValue('statistics_network_hashrate_modifier'),
210210
'tooltip' => 'Auto-adjust displayed network hashrates to a certain limit.'
211211
);
212212
$aSettings['statistics'][] = array(
213213
'display' => 'Personal Hashrate Modifier', 'type' => 'select',
214-
'options' => array( '1' => 'KH/s', '0.001' => 'MH/s', '0.000001' => 'GH/s', '0.000000001' => 'TH/s' ),
214+
'options' => array( '1' => 'KH/s', '0.001' => 'MH/s', '0.000001' => 'GH/s', '0.000000001' => 'TH/s', '0.000000000001' => 'PH/s', '0.000000000000001' => 'EH/s' ),
215215
'default' => '1',
216216
'name' => 'statistics_personal_hashrate_modifier', 'value' => $setting->getValue('statistics_personal_hashrate_modifier'),
217217
'tooltip' => 'Auto-adjust displayed personal hashrates to a certain limit.'

include/smarty_globals.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
if (! $statistics_ajax_long_refresh_interval = $setting->getValue('statistics_ajax_long_refresh_interval')) $statistics_ajax_long_refresh_interval = 10;
4848

4949
// Small helper array
50-
$aHashunits = array( '1' => 'KH/s', '0.001' => 'MH/s', '0.000001' => 'GH/s', '0.000000001' => 'TH/s' );
50+
$aHashunits = array( '1' => 'KH/s', '0.001' => 'MH/s', '0.000001' => 'GH/s', '0.000000001' => 'TH/s', '0.000000000001' => 'PH/s', '0.000000000000001' => 'EH/s' );
5151

5252
// Global data for Smarty
5353
$aGlobal = array(

sql/000_base_structure.sql

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,10 +182,10 @@ CREATE TABLE IF NOT EXISTS `statistics_shares` (
182182
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
183183
`account_id` int(10) unsigned NOT NULL,
184184
`block_id` int(10) unsigned NOT NULL,
185-
`valid` int(11) NOT NULL,
186-
`invalid` int(11) NOT NULL DEFAULT '0',
187-
`pplns_valid` int(11) NOT NULL,
188-
`pplns_invalid` int(11) NOT NULL DEFAULT '0',
185+
`valid` bigint(20) NOT NULL,
186+
`invalid` bigint(20) NOT NULL DEFAULT '0',
187+
`pplns_valid` bigint(20) NOT NULL,
188+
`pplns_invalid` bigint(20) NOT NULL DEFAULT '0',
189189
PRIMARY KEY (`id`),
190190
KEY `account_id` (`account_id`),
191191
KEY `block_id` (`block_id`)

0 commit comments

Comments
 (0)