diff --git a/stratum/config.sample/c11.conf b/stratum/config.sample/c11.conf new file mode 100644 index 0000000..0948d74 --- /dev/null +++ b/stratum/config.sample/c11.conf @@ -0,0 +1,16 @@ +[TCP] +server = yaamp.com +port = 3573 +password = tu8tu5 + +[SQL] +host = yaampdb +database = yaamp +username = root +password = patofpaq + +[STRATUM] +algo = c11 +difficulty = 0.016 +max_ttf = 40000 + diff --git a/web/yaamp/core/backend/markets.php b/web/yaamp/core/backend/markets.php index b80f979..48d7b10 100644 --- a/web/yaamp/core/backend/markets.php +++ b/web/yaamp/core/backend/markets.php @@ -202,7 +202,7 @@ function updateBleutradeMarkets() ///////////////////////////////////////////////////////////////////////////////////////////// -function updateBittrexMarkets() +function updateBittrexMarkets($force = false) { $exchange = 'bittrex'; $list = bittrex_api_query('public/getcurrencies'); @@ -215,25 +215,12 @@ function updateBittrexMarkets() $coin = getdbosql('db_coins', "symbol='$currency->Currency'"); if(!$coin || !$coin->installed) continue; - $market = getdbosql('db_markets', "coinid=$coin->id and name='bittrex'"); - if(!$market) - { - $market = new db_markets; - $market->coinid = $coin->id; - $market->name = 'bittrex'; - } + $market = getdbosql('db_markets', "coinid=$coin->id and name='$exchange'"); + if(!$market) continue; $market->txfee = $currency->TxFee; $market->message = $currency->Notice; - if($coin->symbol == 'EGMA') - { - $market->price = 0.00000001; - $market->save(); - - continue; - } - if(!$currency->IsActive) { $market->price = 0; @@ -252,7 +239,7 @@ function updateBittrexMarkets() if(!empty(EXCH_BITTREX_KEY)) { $last_checked = cache()->get($exchange.'-deposit_address-check-'.$coin->symbol); - if(empty($market->deposit_address) && !$last_checked) + if($force || (empty($market->deposit_address) && !$last_checked)) { $address = bittrex_api_query('account/getdepositaddress', "¤cy={$coin->symbol}"); if(is_object($address) && isset($address->result)) { @@ -263,7 +250,7 @@ function updateBittrexMarkets() } } } - cache()->set($exchange.'-deposit_address-check-'.$coin->symbol, time(), 24*3600); + cache()->set($exchange.'-deposit_address-check-'.$coin->symbol, time(), 12*3600); } $price2 = ($ticker->result->Bid+$ticker->result->Ask)/2;