mirror of
https://github.com/LBRYFoundation/pool.git
synced 2025-09-05 05:15:17 +00:00
markets: only warn about unkown exchange on enabled coins
This commit is contained in:
parent
61d1f4d12f
commit
6b48c43a87
1 changed files with 11 additions and 1 deletions
|
@ -77,6 +77,15 @@ function BackendPricesUpdate()
|
|||
function getBestMarket($coin)
|
||||
{
|
||||
$market = NULL;
|
||||
if ($coin->symbol == 'BTC')
|
||||
return NULL;
|
||||
|
||||
if (!empty($coin->symbol2)) {
|
||||
$alt = getdbosql('db_coins', "symbol=:symbol", array(':symbol'=>$coin->symbol2));
|
||||
if ($alt)
|
||||
return getBestMarket($alt);
|
||||
}
|
||||
|
||||
if (!empty($coin->market)) {
|
||||
// get coin market first (if set)
|
||||
if ($coin->market != 'BEST')
|
||||
|
@ -101,7 +110,8 @@ function getBestMarket($coin)
|
|||
ORDER BY price DESC");
|
||||
}
|
||||
|
||||
if (!$market)
|
||||
// note: you can add a record in market to hide this debug warning
|
||||
if (!$market && $coin->enable)
|
||||
debuglog("best market for {$coin->symbol} is unknown");
|
||||
//else
|
||||
// debuglog("best market for {$coin->symbol} is {$market->name}");
|
||||
|
|
Loading…
Add table
Reference in a new issue