Move algo norm coefs to server config and disable drop algo

Also fix a few php typos..
This commit is contained in:
Tanguy Pruvot 2015-09-29 07:36:43 +02:00
parent 6060d42ca3
commit 2c95534c27
5 changed files with 40 additions and 36 deletions

View file

@ -39,6 +39,6 @@ screen -dmS lyra2v2 $STRATUM_DIR/run.sh lyra2v2
screen -dmS skein $STRATUM_DIR/run.sh skein
screen -dmS skein2 $STRATUM_DIR/run.sh skein2
screen -dmS zr5 $STRATUM_DIR/run.sh zr5
screen -dmS drop $STRATUM_DIR/run.sh drop
#screen -dmS drop $STRATUM_DIR/run.sh drop

View file

@ -65,3 +65,8 @@ $configCustomPorts = array(
// 'x11' => 7000,
);
// mBTC Coefs per algo (default is 1.0)
$configAlgoNormCoef = array(
// 'x11' => 5.0,
);

View file

@ -22,40 +22,40 @@ function yaamp_get_algos()
'groestl', // dmd-gr -m 256
'skein',
'skein2',
'drop',
'zr5',
);
}
// mBTC coef per algo
function yaamp_get_algo_norm($algo)
{
global $configAlgoNormCoef;
if (isset($configAlgoNormCoef[$algo]))
return (float) $configAlgoNormCoef[$algo];
$a = array(
'sha256' => 1,
'scrypt' => 1,
'scryptn' => 0.5,
'c11' => 5.5,
'x11' => 5.5,
'x13' => 3.9,
'x14' => 3.7,
'x15' => 3.5,
'zr5' => 3,
'nist5' => 16,
'neoscrypt' => 0.3,
'lyra2' => 1.3,
'lyra2v2' => 1.3,
'quark' => 5,
'fresh' => 5,
'qubit' => 5,
'skein' => 90,
'groestl' => 5,
'blake' => 300,
'keccak' => 160,
'skein2' => 300,
'zr5' => 5.5,
'sha256' => 1.0,
'scrypt' => 1.0,
'scryptn' => 1.0,
'x11' => 1.0,
'x13' => 1.0,
'zr5' => 1.0,
'nist5' => 1.0,
'neoscrypt' => 1.0,
'lyra2' => 1.0,
'lyra2v2' => 1.0,
'quark' => 1.0,
'fresh' => 1.0,
'qubit' => 1.0,
'skein' => 1.0,
'groestl' => 1.0,
'blake' => 1.0,
'keccak' => 1.0,
'skein2' => 1.0,
);
if(!isset($a[$algo]))
return 0;
return 1.0;
return $a[$algo];
}
@ -81,7 +81,6 @@ function getAlgoColors($algo)
'lyra2v2' => '#80c0f0',
'skein' => '#80a0a0',
'skein2' => '#a0a0a0',
'drop' => '#d0b0d0',
'zr5' => '#d0b0d0',
'MN' => '#ffffff', // MasterNode Earnings
@ -115,7 +114,7 @@ function getAlgoPort($algo)
'qubit' => 4733,
'zr5' => 4833,
'skein' => 4933,
'drop' => 5033,
//'drop' => 5033,
'keccak' => 5133,
'skein2' => 5233,
'groestl' => 5333,

View file

@ -94,7 +94,7 @@ foreach($exchanges as $exchange)
$coin = getdbo('db_coins', $exchange->coinid);
$lowsymbol = strtolower($coin->symbol);
$marketurl = getMarketUrl($coin, $order->market);
$marketurl = getMarketUrl($coin, $exchange->market);
if($exchange->status == 'waiting')
echo "<tr style='background-color: #e0d3e8;'>";
@ -107,13 +107,13 @@ foreach($exchanges as $exchange)
$estimate = bitcoinvaluetoa($exchange->price_estimate);
$total = $exchange->price? bitcoinvaluetoa($exchange->quantity*$exchange->price): bitcoinvaluetoa($exchange->quantity*$coin->price);
echo "<td><img width=16 src='$coin->image'></td>";
echo "<td><b><a href='/site/coin?id=$coin->id'>$coin->name ($coin->symbol)</a></b></td>";
echo "<td><b><a href='$marketurl' target=_blank>$exchange->market</a></b></td>";
echo "<td>$sent</td>";
echo "<td>$exchange->quantity</td>";
echo "<td>$estimate</td>";
echo "<td>$price</td>";
echo '<td><img width="16" src="'.$coin->image.'"></td>';
echo '<td><b><a href="/site/coin?id='.$coin->id.'">'."$coin->name ($coin->symbol)</a></b></td>";
echo '<td><b><a href="'.$marketurl.'" target="_blank">'.$exchange->market.'</a></b></td>';
echo '<td>'.$sent.'</td>';
echo '<td>'.$exchange->quantity.'</td>';
echo '<td>'.$estimate.'</td>';
echo '<td>'.$price.'</td>';
echo $total>0.01? "<td><b>$total</b></td>": "<td>$total</td>";
echo "<td>";

View file

@ -38,7 +38,7 @@ foreach($earnings as $earning)
$coin = getdbo('db_coins', $earning->coinid);
$block = getdbo('db_blocks', $earning->blockid);
if (!$block) {
debuglog('missing block id {$earning->blockid}!');
debuglog("missing block id {$earning->blockid}!");
continue;
}