mirror of
https://github.com/LBRYFoundation/pool.git
synced 2025-08-23 09:27:25 +00:00
sql: add hasgetinfo and no_explorer fields to coins table
wallets without getinfo will be handled in a later commit... ps: remember to restart memcached service after the db change..
This commit is contained in:
parent
d69d3ce3fc
commit
0bf982da95
4 changed files with 35 additions and 1 deletions
13
sql/2018-02-coins_getinfo.sql
Normal file
13
sql/2018-02-coins_getinfo.sql
Normal file
|
@ -0,0 +1,13 @@
|
|||
-- Recent additions to add after db init (.gz)
|
||||
-- mysql yaamp -p < file.sql
|
||||
|
||||
-- filled by the stratum instance, to allow to handle/watch multiple instances
|
||||
|
||||
ALTER TABLE `coins` ADD `hasgetinfo` tinyint(1) UNSIGNED NOT NULL DEFAULT '1' AFTER `account`;
|
||||
|
||||
UPDATE coins SET hassubmitblock=0 WHERE hassubmitblock IS NULL;
|
||||
UPDATE coins SET hassubmitblock=1 WHERE hassubmitblock > 0;
|
||||
ALTER TABLE `coins` CHANGE `hassubmitblock` `hassubmitblock` tinyint(1) UNSIGNED NOT NULL DEFAULT '1';
|
||||
|
||||
ALTER TABLE `coins` ADD `no_explorer` tinyint(1) UNSIGNED NOT NULL DEFAULT '0' AFTER `visible`;
|
||||
|
|
@ -47,6 +47,7 @@ class db_coins extends CActiveRecord
|
|||
'rpcssl' => 'RPC SSL',
|
||||
'rpccert' => 'RPC Certificate',
|
||||
'serveruser' => 'Server user',
|
||||
'hasgetinfo' => 'Has getinfo',
|
||||
'hassubmitblock'=> 'Has submitblock',
|
||||
'hasmasternodes'=> 'Masternodes',
|
||||
'usesegwit' => 'Use segwit',
|
||||
|
|
|
@ -57,6 +57,14 @@ class ExplorerController extends CommonController
|
|||
|
||||
$id = getiparam('id');
|
||||
$coin = getdbo('db_coins', $id);
|
||||
if($coin && $coin->no_explorer) {
|
||||
$link = $coin->link_explorer;
|
||||
//$txid = getparam('txid');
|
||||
//$hash = getparam('hash');
|
||||
//if (!empty($txid)) $link .= 'tx/'.$txid;
|
||||
//elseif (!empty($hash)) $link .= 'block/'.$hash;
|
||||
die("Block explorer disabled, please use <a href=\"$link\">$link</a>");
|
||||
}
|
||||
$height = getiparam('height');
|
||||
if($coin && intval($height)>0)
|
||||
{
|
||||
|
|
|
@ -147,6 +147,12 @@ echo CUFHtml::activeCheckBox($coin, 'installed');
|
|||
echo '<p class="formHint2">Required to be visible in the Wallets board</p>';
|
||||
echo CUFHtml::closeCtrlHolder();
|
||||
|
||||
echo CUFHtml::openActiveCtrlHolder($coin, 'no_explorer');
|
||||
echo CUFHtml::activeLabelEx($coin, 'no_explorer');
|
||||
echo CUFHtml::activeCheckBox($coin, 'no_explorer');
|
||||
echo '<p class="formHint2">Disable block explorer for the public</p>';
|
||||
echo CUFHtml::closeCtrlHolder();
|
||||
|
||||
echo CUFHtml::openActiveCtrlHolder($coin, 'watch');
|
||||
echo CUFHtml::activeLabelEx($coin, 'watch');
|
||||
echo CUFHtml::activeCheckBox($coin, 'watch');
|
||||
|
@ -201,6 +207,12 @@ echo CUFHtml::activeTextField($coin, 'charity_address', array('maxlength'=>200))
|
|||
echo '<p class="formHint2">Foundation address if "dev fees" are required</p>';
|
||||
echo CUFHtml::closeCtrlHolder();
|
||||
|
||||
echo CUFHtml::openActiveCtrlHolder($coin, 'hasgetinfo');
|
||||
echo CUFHtml::activeLabelEx($coin, 'hasgetinfo');
|
||||
echo CUFHtml::activeCheckBox($coin, 'hasgetinfo');
|
||||
echo '<p class="formHint2">Enable if getinfo rpc method is present</p>';
|
||||
echo CUFHtml::closeCtrlHolder();
|
||||
|
||||
echo CUFHtml::openActiveCtrlHolder($coin, 'hassubmitblock');
|
||||
echo CUFHtml::activeLabelEx($coin, 'hassubmitblock');
|
||||
echo CUFHtml::activeCheckBox($coin, 'hassubmitblock');
|
||||
|
@ -216,7 +228,7 @@ echo CUFHtml::closeCtrlHolder();
|
|||
echo CUFHtml::openActiveCtrlHolder($coin, 'hasmasternodes');
|
||||
echo CUFHtml::activeLabelEx($coin, 'hasmasternodes');
|
||||
echo CUFHtml::activeCheckBox($coin, 'hasmasternodes');
|
||||
echo '<p class="formHint2">Require "payee" and "payee_amount" fields in getblocktemplate (DASH)</p>';
|
||||
echo '<p class="formHint2">Require "payee" and "payee_amount", or masternode object in getblocktemplate</p>';
|
||||
echo CUFHtml::closeCtrlHolder();
|
||||
|
||||
echo CUFHtml::openActiveCtrlHolder($coin, 'usesegwit');
|
||||
|
|
Loading…
Add table
Reference in a new issue