mirror of
https://github.com/LBRYFoundation/pool.git
synced 2025-08-23 17:37:25 +00:00
decred: missed one 0.8.x getbalance for tickets
This commit is contained in:
parent
9f3d194fd7
commit
9d1630c40c
1 changed files with 7 additions and 1 deletions
|
@ -124,7 +124,13 @@ function BackendWatchMarkets($marketname=NULL)
|
|||
if ($coin->rpcencoding == 'DCR') {
|
||||
// hack to store the locked balance history as a "stake" market
|
||||
$remote = new WalletRPC($coin);
|
||||
$stake = (double) $remote->getbalance('*',0,'locked');
|
||||
$stake = 0.; //(double) $remote->getbalance('*',0,'locked');
|
||||
$balances = $remote->getbalance('*',0);
|
||||
if (isset($balances["balances"])) {
|
||||
foreach ($balances["balances"] as $accb) {
|
||||
$stake += (double) arraySafeVal($accb, 'lockedbytickets', 0);
|
||||
}
|
||||
}
|
||||
$info = $remote->getstakeinfo();
|
||||
if (empty($remote->error) && isset($info['difficulty']))
|
||||
dborun("UPDATE markets SET balance=0, ontrade=:stake, balancetime=:time,
|
||||
|
|
Loading…
Add table
Reference in a new issue