[UPDATE] Better getinfo detection
This commit is contained in:
parent
b9dc229d20
commit
96ab98a6fa
@ -24,10 +24,11 @@ class BitcoinWrapper extends BitcoinClient {
|
|||||||
public function getinfo() {
|
public function getinfo() {
|
||||||
$this->oDebug->append("STA " . __METHOD__, 4);
|
$this->oDebug->append("STA " . __METHOD__, 4);
|
||||||
if ($data = $this->memcache->get(__FUNCTION__)) return $data;
|
if ($data = $this->memcache->get(__FUNCTION__)) return $data;
|
||||||
if (!(parent::getwalletinfo()['walletname']))
|
try {
|
||||||
return $this->memcache->setCache(__FUNCTION__, parent::getinfo(), 30);
|
|
||||||
else
|
|
||||||
return $this->memcache->setCache(__FUNCTION__, parent::getnetworkinfo()+parent::getmininginfo()+parent::getwalletinfo(), 30);
|
return $this->memcache->setCache(__FUNCTION__, parent::getnetworkinfo()+parent::getmininginfo()+parent::getwalletinfo(), 30);
|
||||||
|
} catch (Exception $e) {
|
||||||
|
return $this->memcache->setCache(__FUNCTION__, parent::getinfo(), 30);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function is_testnet() {
|
public function is_testnet() {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user