mirror of
https://github.com/LBRYFoundation/pool.git
synced 2025-09-01 09:35:12 +00:00
payouts: txmessage and add some traces
This commit is contained in:
parent
23e43aa6a2
commit
87466a31f8
1 changed files with 16 additions and 4 deletions
|
@ -28,7 +28,8 @@ function BackendCoinPayments($coin)
|
||||||
|
|
||||||
$users = getdbolist('db_accounts', "balance>$min and coinid=$coin->id");
|
$users = getdbolist('db_accounts', "balance>$min and coinid=$coin->id");
|
||||||
|
|
||||||
if($coin->symbol == 'MUE' || $coin->symbol == 'DIME')
|
// todo: db field
|
||||||
|
if($coin->symbol == 'MUE' || $coin->symbol == 'BOD' || $coin->symbol == 'DIME' || $coin->symbol == 'BTCRY')
|
||||||
{
|
{
|
||||||
foreach($users as $user)
|
foreach($users as $user)
|
||||||
{
|
{
|
||||||
|
@ -152,9 +153,17 @@ function BackendCoinPayments($coin)
|
||||||
// sometimes the wallet take too much time to answer, so use tx field to double check
|
// sometimes the wallet take too much time to answer, so use tx field to double check
|
||||||
set_time_limit(120);
|
set_time_limit(120);
|
||||||
|
|
||||||
$tx = $remote->sendmany('', $addresses, 1, '');
|
if (!$coin->txmessage)
|
||||||
|
$tx = $remote->sendmany('', $addresses);
|
||||||
|
else
|
||||||
|
$tx = $remote->sendmany('', $addresses, 1, YAAMP_SITE_NAME);
|
||||||
|
|
||||||
if(!$tx) {
|
if(!$tx) {
|
||||||
debuglog($remote->error);
|
debuglog("sendmany: unable to send $total_to_pay {$remote->error} ".json_encode($addresses));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else if(!is_string($tx)) {
|
||||||
|
debuglog("sendmany: result is not a string tx=".json_encode($tx));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -206,7 +215,10 @@ function BackendCoinPayments($coin)
|
||||||
// redo failed payouts
|
// redo failed payouts
|
||||||
if (!empty($addresses))
|
if (!empty($addresses))
|
||||||
{
|
{
|
||||||
$tx = $remote->sendmany('', $addresses, 1, '');
|
if (!$coin->txmessage)
|
||||||
|
$tx = $remote->sendmany('', $addresses);
|
||||||
|
else
|
||||||
|
$tx = $remote->sendmany('', $addresses, 1, YAAMP_SITE_NAME." retry");
|
||||||
|
|
||||||
if(empty($tx)) {
|
if(empty($tx)) {
|
||||||
debuglog($remote->error);
|
debuglog($remote->error);
|
||||||
|
|
Loading…
Add table
Reference in a new issue