parent
af70a194c9
commit
4be963d7be
@ -32,7 +32,7 @@ if ($config['payout_system'] != 'pps') {
|
||||
// Fetch all transactions since our last block
|
||||
if ( $bitcoin->can_connect() === true ){
|
||||
$dDifficulty = $bitcoin->getdifficulty();
|
||||
if (strtolower($config['currency']) == 'pos')
|
||||
if (is_array($dDifficulty) && array_key_exists('proof-of-work', $dDifficulty))
|
||||
$dDifficulty = $dDifficulty['proof-of-work'];
|
||||
} else {
|
||||
verbose("Aborted: " . $bitcoin->can_connect() . "\n");
|
||||
|
||||
@ -11,7 +11,7 @@ $id = $user->checkApiKey($_REQUEST['api_key']);
|
||||
if ($bitcoin->can_connect() === true){
|
||||
if (!$dDifficulty = $memcache->get('dDifficulty')) {
|
||||
$dDifficulty = $bitcoin->query('getdifficulty');
|
||||
if (strtolower($config['currency']) == 'pos')
|
||||
if (is_array($dDifficulty) && array_key_exists('proof-of-work', $dDifficulty))
|
||||
$dDifficulty = $dDifficulty['proof-of-work'];
|
||||
$memcache->set('dDifficulty', $dDifficulty);
|
||||
}
|
||||
|
||||
@ -6,7 +6,7 @@ if (!defined('SECURITY'))
|
||||
|
||||
if ($bitcoin->can_connect() === true){
|
||||
$dDifficulty = $bitcoin->query('getdifficulty');
|
||||
if (strtolower($config['currency']) == 'pos')
|
||||
if (is_array($dDifficulty) && array_key_exists('proof-of-work', $dDifficulty))
|
||||
$dDifficulty = $dDifficulty['proof-of-work'];
|
||||
$iBlock = $bitcoin->query('getblockcount');
|
||||
} else {
|
||||
|
||||
@ -7,7 +7,7 @@ if (!defined('SECURITY'))
|
||||
// Fetch data from litecoind
|
||||
if ($bitcoin->can_connect() === true){
|
||||
$dDifficulty = $bitcoin->getdifficulty();
|
||||
if (strtolower($config['currency']) == 'pos')
|
||||
if (is_array($dDifficulty) && array_key_exists('proof-of-work', $dDifficulty))
|
||||
$dDifficulty = $dDifficulty['proof-of-work'];
|
||||
$iBlock = $bitcoin->getblockcount();
|
||||
} else {
|
||||
|
||||
@ -16,7 +16,7 @@ if (@$_SESSION['AUTHENTICATED']) {
|
||||
$aRoundShares = $statistics->getRoundShares();
|
||||
if ($bitcoin->can_connect() === true) {
|
||||
$dDifficulty = $bitcoin->query('getdifficulty');
|
||||
if (strtolower($config['currency']) == 'pos')
|
||||
if (is_array($dDifficulty) && array_key_exists('proof-of-work', $dDifficulty))
|
||||
$dDifficulty = $dDifficulty['proof-of-work'];
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user