mirror of
https://github.com/LBRYFoundation/pool.git
synced 2025-08-23 17:37:25 +00:00
Preparation for DigiByte rpcencoding (#289)
Since 6.16.3, listtransactions requires '*' in account field And soon, it may require different rules for mining (algo)
This commit is contained in:
parent
38a114b8dd
commit
e178ccaac4
2 changed files with 8 additions and 4 deletions
|
@ -133,9 +133,12 @@ class PayoutCommand extends CConsoleCommand
|
||||||
if (empty($payouts) || empty($ids))
|
if (empty($payouts) || empty($ids))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
$DCR = ($coin->rpcencoding == 'DCR' || $coin->getOfficialSymbol() == 'DCR');
|
||||||
|
$DGB = ($coin->rpcencoding == 'DGB' || $coin->getOfficialSymbol() == 'DGB');
|
||||||
|
|
||||||
$remote = new WalletRPC($coin);
|
$remote = new WalletRPC($coin);
|
||||||
$account = '';
|
$account = '';
|
||||||
if ($coin->rpcencoding == 'DCR') $account = '*';
|
if ($DCR || $DGB) $account = '*';
|
||||||
$rawtxs = $remote->listtransactions($account, 25000);
|
$rawtxs = $remote->listtransactions($account, 25000);
|
||||||
|
|
||||||
foreach ($ids as $uid => $user_addr)
|
foreach ($ids as $uid => $user_addr)
|
||||||
|
|
|
@ -4,7 +4,8 @@ $coin = getdbo('db_coins', getiparam('id'));
|
||||||
if (!$coin) $this->goback();
|
if (!$coin) $this->goback();
|
||||||
|
|
||||||
$PoS = ($coin->algo == 'PoS'); // or if 'stake' key is present in 'getinfo' method
|
$PoS = ($coin->algo == 'PoS'); // or if 'stake' key is present in 'getinfo' method
|
||||||
$DCR = ($coin->rpcencoding == 'DCR');
|
$DCR = ($coin->rpcencoding == 'DCR' || $coin->getOfficialSymbol() == 'DCR');
|
||||||
|
$DGB = ($coin->rpcencoding == 'DGB' || $coin->getOfficialSymbol() == 'DGB');
|
||||||
$ETH = ($coin->rpcencoding == 'GETH');
|
$ETH = ($coin->rpcencoding == 'GETH');
|
||||||
|
|
||||||
$remote = new WalletRPC($coin);
|
$remote = new WalletRPC($coin);
|
||||||
|
@ -296,8 +297,8 @@ echo <<<end
|
||||||
end;
|
end;
|
||||||
|
|
||||||
$account = '';
|
$account = '';
|
||||||
if ($DCR) $account = '*';
|
if ($DCR || $DGB) $account = '*';
|
||||||
if ($ETH) $account = $coin->master_wallet;
|
else if ($ETH) $account = $coin->master_wallet;
|
||||||
|
|
||||||
$txs = $remote->listtransactions($account, $maxrows);
|
$txs = $remote->listtransactions($account, $maxrows);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue