mirror of
https://github.com/LBRYFoundation/pool.git
synced 2025-08-31 17:21:26 +00:00
Move algo norm coefs to server config and disable drop algo
Also fix a few php typos..
This commit is contained in:
parent
6060d42ca3
commit
2c95534c27
5 changed files with 40 additions and 36 deletions
2
rc.local
2
rc.local
|
@ -39,6 +39,6 @@ screen -dmS lyra2v2 $STRATUM_DIR/run.sh lyra2v2
|
||||||
screen -dmS skein $STRATUM_DIR/run.sh skein
|
screen -dmS skein $STRATUM_DIR/run.sh skein
|
||||||
screen -dmS skein2 $STRATUM_DIR/run.sh skein2
|
screen -dmS skein2 $STRATUM_DIR/run.sh skein2
|
||||||
screen -dmS zr5 $STRATUM_DIR/run.sh zr5
|
screen -dmS zr5 $STRATUM_DIR/run.sh zr5
|
||||||
screen -dmS drop $STRATUM_DIR/run.sh drop
|
#screen -dmS drop $STRATUM_DIR/run.sh drop
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -65,3 +65,8 @@ $configCustomPorts = array(
|
||||||
// 'x11' => 7000,
|
// 'x11' => 7000,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// mBTC Coefs per algo (default is 1.0)
|
||||||
|
$configAlgoNormCoef = array(
|
||||||
|
// 'x11' => 5.0,
|
||||||
|
);
|
||||||
|
|
||||||
|
|
|
@ -22,40 +22,40 @@ function yaamp_get_algos()
|
||||||
'groestl', // dmd-gr -m 256
|
'groestl', // dmd-gr -m 256
|
||||||
'skein',
|
'skein',
|
||||||
'skein2',
|
'skein2',
|
||||||
'drop',
|
|
||||||
'zr5',
|
'zr5',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// mBTC coef per algo
|
||||||
function yaamp_get_algo_norm($algo)
|
function yaamp_get_algo_norm($algo)
|
||||||
{
|
{
|
||||||
|
global $configAlgoNormCoef;
|
||||||
|
if (isset($configAlgoNormCoef[$algo]))
|
||||||
|
return (float) $configAlgoNormCoef[$algo];
|
||||||
|
|
||||||
$a = array(
|
$a = array(
|
||||||
'sha256' => 1,
|
'sha256' => 1.0,
|
||||||
'scrypt' => 1,
|
'scrypt' => 1.0,
|
||||||
'scryptn' => 0.5,
|
'scryptn' => 1.0,
|
||||||
'c11' => 5.5,
|
'x11' => 1.0,
|
||||||
'x11' => 5.5,
|
'x13' => 1.0,
|
||||||
'x13' => 3.9,
|
'zr5' => 1.0,
|
||||||
'x14' => 3.7,
|
'nist5' => 1.0,
|
||||||
'x15' => 3.5,
|
'neoscrypt' => 1.0,
|
||||||
'zr5' => 3,
|
'lyra2' => 1.0,
|
||||||
'nist5' => 16,
|
'lyra2v2' => 1.0,
|
||||||
'neoscrypt' => 0.3,
|
'quark' => 1.0,
|
||||||
'lyra2' => 1.3,
|
'fresh' => 1.0,
|
||||||
'lyra2v2' => 1.3,
|
'qubit' => 1.0,
|
||||||
'quark' => 5,
|
'skein' => 1.0,
|
||||||
'fresh' => 5,
|
'groestl' => 1.0,
|
||||||
'qubit' => 5,
|
'blake' => 1.0,
|
||||||
'skein' => 90,
|
'keccak' => 1.0,
|
||||||
'groestl' => 5,
|
'skein2' => 1.0,
|
||||||
'blake' => 300,
|
|
||||||
'keccak' => 160,
|
|
||||||
'skein2' => 300,
|
|
||||||
'zr5' => 5.5,
|
|
||||||
);
|
);
|
||||||
|
|
||||||
if(!isset($a[$algo]))
|
if(!isset($a[$algo]))
|
||||||
return 0;
|
return 1.0;
|
||||||
|
|
||||||
return $a[$algo];
|
return $a[$algo];
|
||||||
}
|
}
|
||||||
|
@ -81,7 +81,6 @@ function getAlgoColors($algo)
|
||||||
'lyra2v2' => '#80c0f0',
|
'lyra2v2' => '#80c0f0',
|
||||||
'skein' => '#80a0a0',
|
'skein' => '#80a0a0',
|
||||||
'skein2' => '#a0a0a0',
|
'skein2' => '#a0a0a0',
|
||||||
'drop' => '#d0b0d0',
|
|
||||||
'zr5' => '#d0b0d0',
|
'zr5' => '#d0b0d0',
|
||||||
|
|
||||||
'MN' => '#ffffff', // MasterNode Earnings
|
'MN' => '#ffffff', // MasterNode Earnings
|
||||||
|
@ -115,7 +114,7 @@ function getAlgoPort($algo)
|
||||||
'qubit' => 4733,
|
'qubit' => 4733,
|
||||||
'zr5' => 4833,
|
'zr5' => 4833,
|
||||||
'skein' => 4933,
|
'skein' => 4933,
|
||||||
'drop' => 5033,
|
//'drop' => 5033,
|
||||||
'keccak' => 5133,
|
'keccak' => 5133,
|
||||||
'skein2' => 5233,
|
'skein2' => 5233,
|
||||||
'groestl' => 5333,
|
'groestl' => 5333,
|
||||||
|
|
|
@ -94,7 +94,7 @@ foreach($exchanges as $exchange)
|
||||||
$coin = getdbo('db_coins', $exchange->coinid);
|
$coin = getdbo('db_coins', $exchange->coinid);
|
||||||
$lowsymbol = strtolower($coin->symbol);
|
$lowsymbol = strtolower($coin->symbol);
|
||||||
|
|
||||||
$marketurl = getMarketUrl($coin, $order->market);
|
$marketurl = getMarketUrl($coin, $exchange->market);
|
||||||
|
|
||||||
if($exchange->status == 'waiting')
|
if($exchange->status == 'waiting')
|
||||||
echo "<tr style='background-color: #e0d3e8;'>";
|
echo "<tr style='background-color: #e0d3e8;'>";
|
||||||
|
@ -107,13 +107,13 @@ foreach($exchanges as $exchange)
|
||||||
$estimate = bitcoinvaluetoa($exchange->price_estimate);
|
$estimate = bitcoinvaluetoa($exchange->price_estimate);
|
||||||
$total = $exchange->price? bitcoinvaluetoa($exchange->quantity*$exchange->price): bitcoinvaluetoa($exchange->quantity*$coin->price);
|
$total = $exchange->price? bitcoinvaluetoa($exchange->quantity*$exchange->price): bitcoinvaluetoa($exchange->quantity*$coin->price);
|
||||||
|
|
||||||
echo "<td><img width=16 src='$coin->image'></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="/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><b><a href="'.$marketurl.'" target="_blank">'.$exchange->market.'</a></b></td>';
|
||||||
echo "<td>$sent</td>";
|
echo '<td>'.$sent.'</td>';
|
||||||
echo "<td>$exchange->quantity</td>";
|
echo '<td>'.$exchange->quantity.'</td>';
|
||||||
echo "<td>$estimate</td>";
|
echo '<td>'.$estimate.'</td>';
|
||||||
echo "<td>$price</td>";
|
echo '<td>'.$price.'</td>';
|
||||||
echo $total>0.01? "<td><b>$total</b></td>": "<td>$total</td>";
|
echo $total>0.01? "<td><b>$total</b></td>": "<td>$total</td>";
|
||||||
|
|
||||||
echo "<td>";
|
echo "<td>";
|
||||||
|
|
|
@ -38,7 +38,7 @@ foreach($earnings as $earning)
|
||||||
$coin = getdbo('db_coins', $earning->coinid);
|
$coin = getdbo('db_coins', $earning->coinid);
|
||||||
$block = getdbo('db_blocks', $earning->blockid);
|
$block = getdbo('db_blocks', $earning->blockid);
|
||||||
if (!$block) {
|
if (!$block) {
|
||||||
debuglog('missing block id {$earning->blockid}!');
|
debuglog("missing block id {$earning->blockid}!");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue