Skip to content

Commit 96ab98a

Browse files
committed
[UPDATE] Better getinfo detection
1 parent b9dc229 commit 96ab98a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

include/classes/bitcoinwrapper.class.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,11 @@ public function __construct($type, $username, $password, $host, $debug_level, $d
2424
public function getinfo() {
2525
$this->oDebug->append("STA " . __METHOD__, 4);
2626
if ($data = $this->memcache->get(__FUNCTION__)) return $data;
27-
if (!(parent::getwalletinfo()['walletname']))
28-
return $this->memcache->setCache(__FUNCTION__, parent::getinfo(), 30);
29-
else
27+
try {
3028
return $this->memcache->setCache(__FUNCTION__, parent::getnetworkinfo()+parent::getmininginfo()+parent::getwalletinfo(), 30);
29+
} catch (Exception $e) {
30+
return $this->memcache->setCache(__FUNCTION__, parent::getinfo(), 30);
31+
}
3132
}
3233

3334
public function is_testnet() {

0 commit comments

Comments
 (0)