mirror of
https://github.com/LBRYFoundation/pool.git
synced 2025-08-30 08:51:24 +00:00
coins: link the new fields in form
notes: - account "default" should be set for decred - payout_min handled (should be > txfee) - payout_max to handle... stratum rpc/account changes will be made in a second commit
This commit is contained in:
parent
a338131f28
commit
e4ef728d40
4 changed files with 43 additions and 7 deletions
|
@ -77,9 +77,8 @@ function BackendCoinsUpdate()
|
||||||
|
|
||||||
if(empty($coin->master_wallet))
|
if(empty($coin->master_wallet))
|
||||||
{
|
{
|
||||||
$account = '';
|
if ($coin->symbol == 'DCR' && empty($coin->account)) $coin->account = 'default';
|
||||||
if ($coin->symbol == 'DCR') $account = 'default';
|
$coin->master_wallet = $remote->getaccountaddress($coin->account);
|
||||||
$coin->master_wallet = $remote->getaccountaddress($account);
|
|
||||||
// debuglog($coin->master_wallet);
|
// debuglog($coin->master_wallet);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@ function BackendCoinPayments($coin)
|
||||||
}
|
}
|
||||||
|
|
||||||
$txfee = floatval($coin->txfee);
|
$txfee = floatval($coin->txfee);
|
||||||
$min_payout = max(floatval(YAAMP_PAYMENTS_MINI), $txfee);
|
$min_payout = max(floatval(YAAMP_PAYMENTS_MINI), floatval($coin->payout_min), $txfee);
|
||||||
|
|
||||||
if(date("w", time()) == 0 && date("H", time()) > 18) { // sunday evening, minimum reduced
|
if(date("w", time()) == 0 && date("H", time()) > 18) { // sunday evening, minimum reduced
|
||||||
$min_payout = max($min_payout/10, $txfee);
|
$min_payout = max($min_payout/10, $txfee);
|
||||||
|
@ -177,9 +177,7 @@ function BackendCoinPayments($coin)
|
||||||
set_time_limit(120);
|
set_time_limit(120);
|
||||||
|
|
||||||
// default account
|
// default account
|
||||||
$account = '';
|
$account = $coin->account;
|
||||||
if ($coin->symbol == 'DCR') $account = 'default';
|
|
||||||
|
|
||||||
|
|
||||||
if (!$coin->txmessage)
|
if (!$coin->txmessage)
|
||||||
$tx = $remote->sendmany($account, $addresses);
|
$tx = $remote->sendmany($account, $addresses);
|
||||||
|
|
|
@ -41,6 +41,9 @@ class db_coins extends CActiveRecord
|
||||||
'rpcport' => 'RPC Port',
|
'rpcport' => 'RPC Port',
|
||||||
'rpcuser' => 'RPC User',
|
'rpcuser' => 'RPC User',
|
||||||
'rpcpasswd' => 'RPC Password',
|
'rpcpasswd' => 'RPC Password',
|
||||||
|
'rpccurl' => 'RPC via curl',
|
||||||
|
'rpcssl' => 'RPC SSL',
|
||||||
|
'rpccert' => 'RPC Certificate',
|
||||||
'serveruser' => 'Server user',
|
'serveruser' => 'Server user',
|
||||||
'hassubmitblock'=> 'Has submitblock',
|
'hassubmitblock'=> 'Has submitblock',
|
||||||
'hasmasternodes'=> 'Masternodes',
|
'hasmasternodes'=> 'Masternodes',
|
||||||
|
|
|
@ -60,6 +60,18 @@ echo CUFHtml::activeTextField($coin, 'image', array('maxlength'=>200));
|
||||||
echo '<p class="formHint2"></p>';
|
echo '<p class="formHint2"></p>';
|
||||||
echo CUFHtml::closeCtrlHolder();
|
echo CUFHtml::closeCtrlHolder();
|
||||||
|
|
||||||
|
echo CUFHtml::openActiveCtrlHolder($coin, 'payout_min');
|
||||||
|
echo CUFHtml::activeLabelEx($coin, 'payout_min');
|
||||||
|
echo CUFHtml::activeTextField($coin, 'payout_min', array('maxlength'=>200,'style'=>'width: 120px;'));
|
||||||
|
echo '<p class="formHint2">Pay users when they reach this amount</p>';
|
||||||
|
echo CUFHtml::closeCtrlHolder();
|
||||||
|
|
||||||
|
echo CUFHtml::openActiveCtrlHolder($coin, 'payout_max');
|
||||||
|
echo CUFHtml::activeLabelEx($coin, 'payout_max');
|
||||||
|
echo CUFHtml::activeTextField($coin, 'payout_max', array('maxlength'=>200,'style'=>'width: 120px;'));
|
||||||
|
echo '<p class="formHint2">Maximum transaction amount</p>';
|
||||||
|
echo CUFHtml::closeCtrlHolder();
|
||||||
|
|
||||||
echo CUFHtml::openActiveCtrlHolder($coin, 'txfee');
|
echo CUFHtml::openActiveCtrlHolder($coin, 'txfee');
|
||||||
echo CUFHtml::activeLabelEx($coin, 'txfee');
|
echo CUFHtml::activeLabelEx($coin, 'txfee');
|
||||||
echo CUFHtml::activeTextField($coin, 'txfee', array('maxlength'=>200,'style'=>'width: 100px;','readonly'=>'readonly'));
|
echo CUFHtml::activeTextField($coin, 'txfee', array('maxlength'=>200,'style'=>'width: 100px;','readonly'=>'readonly'));
|
||||||
|
@ -278,6 +290,30 @@ echo CUFHtml::activeTextField($coin, 'rpcencoding', array('maxlength'=>5,'style'
|
||||||
echo '<p class="formHint2">POW/POS</p>';
|
echo '<p class="formHint2">POW/POS</p>';
|
||||||
echo CUFHtml::closeCtrlHolder();
|
echo CUFHtml::closeCtrlHolder();
|
||||||
|
|
||||||
|
echo CUFHtml::openActiveCtrlHolder($coin, 'rpccurl');
|
||||||
|
echo CUFHtml::activeLabelEx($coin, 'rpccurl');
|
||||||
|
echo CUFHtml::activeCheckBox($coin, 'rpccurl');
|
||||||
|
echo '<p class="formHint2">Force the stratum to use curl for RPC</p>';
|
||||||
|
echo CUFHtml::closeCtrlHolder();
|
||||||
|
|
||||||
|
echo CUFHtml::openActiveCtrlHolder($coin, 'rpcssl');
|
||||||
|
echo CUFHtml::activeLabelEx($coin, 'rpcssl');
|
||||||
|
echo CUFHtml::activeCheckBox($coin, 'rpcssl');
|
||||||
|
echo '<p class="formHint2">Wallet RPC secured via SSL</p>';
|
||||||
|
echo CUFHtml::closeCtrlHolder();
|
||||||
|
|
||||||
|
echo CUFHtml::openActiveCtrlHolder($coin, 'rpccert');
|
||||||
|
echo CUFHtml::activeLabelEx($coin, 'rpccert');
|
||||||
|
echo CUFHtml::activeTextField($coin, 'rpccert');
|
||||||
|
echo "<p class='formHint2'>Certificat file for RPC via SSL</p>";
|
||||||
|
echo CUFHtml::closeCtrlHolder();
|
||||||
|
|
||||||
|
echo CUFHtml::openActiveCtrlHolder($coin, 'account');
|
||||||
|
echo CUFHtml::activeLabelEx($coin, 'account');
|
||||||
|
echo CUFHtml::activeTextField($coin, 'account', array('maxlength'=>128,'style'=>'width: 180px;'));
|
||||||
|
echo '<p class="formHint2">Wallet account to use</p>';
|
||||||
|
echo CUFHtml::closeCtrlHolder();
|
||||||
|
|
||||||
if ($coin->id) {
|
if ($coin->id) {
|
||||||
echo CHtml::tag("hr");
|
echo CHtml::tag("hr");
|
||||||
echo "<b>Sample config</b>:";
|
echo "<b>Sample config</b>:";
|
||||||
|
|
Loading…
Add table
Reference in a new issue