[UPDATE] Better getinfo detection

This commit is contained in:
Sebastian Grewe 2018-05-18 12:58:36 +02:00
parent b9dc229d20
commit 96ab98a6fa

View File

@ -24,10 +24,11 @@ class BitcoinWrapper extends BitcoinClient {
public function getinfo() {
$this->oDebug->append("STA " . __METHOD__, 4);
if ($data = $this->memcache->get(__FUNCTION__)) return $data;
if (!(parent::getwalletinfo()['walletname']))
return $this->memcache->setCache(__FUNCTION__, parent::getinfo(), 30);
else
try {
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() {