commit
1af8862583
|
@ -80,6 +80,8 @@ Comes with lightweight example front-end script which uses the pool's AJAX API.
|
|||
|
||||
* http://extremepool.org
|
||||
* http://xminingpool.com
|
||||
* http://noclaymorefee.com
|
||||
* http://nicepool.org
|
||||
|
||||
Usage
|
||||
===
|
||||
|
|
|
@ -89,7 +89,8 @@
|
|||
"depth": 60,
|
||||
"poolFee": 2,
|
||||
"devDonation": 0.1,
|
||||
"coreDevDonation": 0.1
|
||||
"coreDevDonation": 0.1,
|
||||
"extraFeaturesDevDonation":0.1
|
||||
},
|
||||
|
||||
"api": {
|
||||
|
@ -104,7 +105,7 @@
|
|||
|
||||
"daemon": {
|
||||
"host": "127.0.0.1",
|
||||
"port": 18081
|
||||
"port": 42081
|
||||
},
|
||||
|
||||
"wallet": {
|
||||
|
|
|
@ -133,9 +133,7 @@ function collectStats(){
|
|||
coinDifficultyTarget: config.coinDifficultyTarget,
|
||||
symbol: config.symbol,
|
||||
depth: config.blockUnlocker.depth,
|
||||
donation: config.blockUnlocker.devDonation,
|
||||
coreDonation: config.blockUnlocker.coreDevDonation,
|
||||
doDonations: doDonations,
|
||||
donation: donations,
|
||||
version: version,
|
||||
minPaymentThreshold: config.payments.minPayment,
|
||||
denominationUnit: config.payments.denomination
|
||||
|
|
|
@ -179,15 +179,12 @@ function runInterval(){
|
|||
|
||||
var feePercent = config.blockUnlocker.poolFee / 100;
|
||||
|
||||
if (doDonations) {
|
||||
feePercent += config.blockUnlocker.devDonation / 100;
|
||||
feePercent += config.blockUnlocker.coreDevDonation / 100;
|
||||
|
||||
var devDonation = block.reward * (config.blockUnlocker.devDonation / 100);
|
||||
payments[devDonationAddress] = devDonation;
|
||||
|
||||
var coreDevDonation = block.reward * (config.blockUnlocker.coreDevDonation / 100);
|
||||
payments[coreDevDonationAddress] = coreDevDonation;
|
||||
if (Object.keys(donations).length) {
|
||||
for(var wallet in donations) {
|
||||
var percent = donations[wallet];
|
||||
feePercent += percent;
|
||||
payments[wallet] = block.reward * (percent / 100);
|
||||
}
|
||||
}
|
||||
|
||||
var reward = block.reward - (block.reward * feePercent);
|
||||
|
@ -232,4 +229,4 @@ function runInterval(){
|
|||
})
|
||||
}
|
||||
|
||||
runInterval();
|
||||
runInterval();
|
||||
|
|
|
@ -40,7 +40,7 @@ function convertPaymentsDataToChart(paymentsData) {
|
|||
var data = [];
|
||||
if(paymentsData && paymentsData.length) {
|
||||
for(var i = 0; paymentsData[i]; i += 2) {
|
||||
data.push([+paymentsData[i + 1], paymentsData[i].split(':')[1]]);
|
||||
data.unshift([+paymentsData[i + 1], paymentsData[i].split(':')[1]]);
|
||||
}
|
||||
}
|
||||
return data;
|
||||
|
@ -83,7 +83,7 @@ var statValueHandler = {
|
|||
avg: function(set, value) {
|
||||
set[1] = (set[1] * set[2] + value) / (set[2] + 1);
|
||||
},
|
||||
round: function(set, value) {
|
||||
avgRound: function(set, value) {
|
||||
statValueHandler.avg(set, value);
|
||||
set[1] = Math.round(set[1]);
|
||||
},
|
||||
|
@ -95,9 +95,9 @@ var statValueHandler = {
|
|||
};
|
||||
|
||||
var preSaveFunctions = {
|
||||
hashrate: statValueHandler.avg,
|
||||
hashrate: statValueHandler.avgRound,
|
||||
workers: statValueHandler.max,
|
||||
difficulty: statValueHandler.round,
|
||||
difficulty: statValueHandler.avgRound,
|
||||
price: statValueHandler.avg,
|
||||
profit: statValueHandler.avg
|
||||
};
|
||||
|
@ -122,12 +122,11 @@ function storeCollectedValue(chartName, value, settings) {
|
|||
else {
|
||||
preSaveFunctions[chartName]
|
||||
? preSaveFunctions[chartName](lastSet, value)
|
||||
: statValueHandler.round(lastSet, value);
|
||||
: statValueHandler.avgRound(lastSet, value);
|
||||
lastSet[2]++;
|
||||
}
|
||||
redisClient.set(getStatsRedisKey(chartName), JSON.stringify(sets));
|
||||
log('info', logSystem, chartName + ' chart collected value ' + value + '. Total sets count ' + sets.length);
|
||||
log('info', logSystem, chartName + ' data: ' + JSON.stringify(sets));
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -17,9 +17,36 @@ catch(e){
|
|||
return;
|
||||
}
|
||||
|
||||
global.version = "v0.99.3.1";
|
||||
global.devDonationAddress = '45Jmf8PnJKziGyrLouJMeBFw2yVyX1QB52sKEQ4S1VSU2NVsaVGPNu4bWKkaHaeZ6tWCepP6iceZk8XhTLzDaEVa72QrtVh';
|
||||
global.coreDevDonationAddress = '46BeWrHpwXmHDpDEUmZBWZfoQpdc6HaERCNmx1pEYL2rAcuwufPN9rXHHtyUA4QVy66qeFQkn6sfK8aHYjA3jk3o1Bv16em';
|
||||
global.doDonations = devDonationAddress[0] === config.poolServer.poolAddress[0] && (
|
||||
config.blockUnlocker.devDonation > 0 || config.blockUnlocker.coreDevDonation > 0
|
||||
);
|
||||
var donationAddresses = {
|
||||
devDonation: {
|
||||
XMR: '45Jmf8PnJKziGyrLouJMeBFw2yVyX1QB52sKEQ4S1VSU2NVsaVGPNu4bWKkaHaeZ6tWCepP6iceZk8XhTLzDaEVa72QrtVh'
|
||||
},
|
||||
coreDevDonation: {
|
||||
XMR: '46BeWrHpwXmHDpDEUmZBWZfoQpdc6HaERCNmx1pEYL2rAcuwufPN9rXHHtyUA4QVy66qeFQkn6sfK8aHYjA3jk3o1Bv16em'
|
||||
},
|
||||
extraFeaturesDevDonation: {
|
||||
XDN: 'dddcPW8VjhJA9U2QDPunnkL8Yky83TdEBGThXsETtmAx8q7jvni7Kt4hn8pqS3ks7GhM2z9BeD22jgKewZ2kQhWK27ZaGfLHQ',
|
||||
BCN: '23emzdEQqoWAifE1ZQLTrGAmVkdzjami82xgX4zWoX2VbiuGuunMJ1oF14PPa1cVRgGFz8tUWevsSNzMcPqHiQmF7iSzS1g',
|
||||
BBR: '1Gy4NimzTgyhcZ22432N4ojP9HC6mHpML2g8SsmmjPZS4o8SYNFND99LAihRPHA2ddarf3okkJ3umTC2gLpysKBfLi4hfTF',
|
||||
XMR: '43JNtJkxnhX789pJnCV6W4DQt8BqAWVoV4pqjGiWZ9845ee3aTBRBibMBzSziQi9BD5aEEpegQjLwguUgsXecB5bCY5wrMe',
|
||||
QCN: '1MafhBsdrkW3ssQexQzHf8Q2VBEWE3DmrbySKJzXXNJFeHHTWahDkJ3iLkiKnAMMtzHPeLrsYVmkQJJ9DJx3ToodKUapV8p',
|
||||
FCN: '6iAu6xDGnSFekMxJj7S61aepNVXbyCrV7PgWWKSfsEPyXbUjHAxjgq3KwED3dWrgddCRRtwBrrYgmVLZR7vdBr3KLe9Cowd',
|
||||
MCN: 'Vdufe8Pjkp2apvJC2N3Q7KdqiDDnLR3cH8hPhB2hjBtdXRxnHmHdgESbCjAD5dv1oiFrA1jKJQqszHWELdNygCGW2Ri6qRH1B',
|
||||
AEON: 'Wmsfi4rDdUC4xQyMo7f4BkfuPtSooPZ3wfx8e7JFXaKyfFY5buDJF4UakwhLp3FXxKVwB3ZFLQ3bTUBksCoG3tVQ2tzkrCZDm',
|
||||
OEC: 'C53KdM3sWk2P27yvqihNDEVsCtDQH9koJTdmEX96ftqgTvSsuvg5HMJ2dLnynwcWr5d3oMvwzsQVKdVeYchG5iU6L5rNJjd',
|
||||
DSH: 'D9t1KjB9w2haRp29ueJ9jHfTyq1FSzpMqavKpfFuwa8yEdHKuryfmh4W6ZzbHC71JFLoRD4ny7HWm15jb52JYcye7bBjD62',
|
||||
INF8: 'inf8FtwGgmaATeXKvycUT7BfxiawxqhfRXaahPog7s4c7L8qreSvnebNDvwfDBXrip8ptgKgbToV73mS5M1cNviY5sbKhKitCd'
|
||||
}
|
||||
};
|
||||
|
||||
global.donations = {};
|
||||
|
||||
for(var configOption in donationAddresses) {
|
||||
var percent = config.blockUnlocker[configOption];
|
||||
var wallet = donationAddresses[configOption][config.symbol];
|
||||
if(percent && wallet) {
|
||||
global.donations[wallet] = percent;
|
||||
}
|
||||
}
|
||||
|
||||
global.version = "v1.1.4";
|
||||
|
|
|
@ -6,7 +6,7 @@ var irc = "irc.freenode.net/#poolhost";
|
|||
|
||||
var email = "support@poolhost.com";
|
||||
|
||||
var cryptonatorWidget = ["XMR-BTC", "XMR-USD", "XMR-EUR"];
|
||||
var cryptonatorWidget = ["XDN-BTC", "XDN-USD", "XDN-EUR"];
|
||||
|
||||
var easyminerDownload = "https://github.com/zone117x/cryptonote-easy-miner/releases/";
|
||||
|
||||
|
@ -14,4 +14,4 @@ var blockchainExplorer = "http://chainradar.com/{symbol}/block/{id}";
|
|||
|
||||
var transactionExplorer = "http://chainradar.com/{symbol}/transaction/{id}";
|
||||
|
||||
var themeCss = "themes/default-theme.css";
|
||||
var themeCss = "themes/default-theme.css";
|
||||
|
|
|
@ -256,6 +256,10 @@
|
|||
});
|
||||
}
|
||||
|
||||
function floatToString(float) {
|
||||
return float.toFixed(6).replace(/[0\.]+$/, '');
|
||||
}
|
||||
|
||||
|
||||
var xhrPageLoading;
|
||||
function routePage(loadedCallback) {
|
||||
|
@ -287,6 +291,11 @@
|
|||
|
||||
function updateIndex(){
|
||||
updateText('coinName', lastStats.config.coin);
|
||||
updateText('poolVersion', lastStats.config.version);
|
||||
}
|
||||
|
||||
function getBlockchainUrl(id) {
|
||||
return blockchainExplorer.replace('{symbol}', lastStats.config.symbol.toLowerCase()).replace('{id}', id);
|
||||
}
|
||||
|
||||
$(function(){
|
||||
|
@ -353,7 +362,8 @@
|
|||
|
||||
<footer>
|
||||
<div class="text-muted">
|
||||
Powered by <a target="_blank" href="//github.com/fancoder/cryptonote-universal-pool"><i class="fa fa-github"></i> cryptonote-universal-pool</a>
|
||||
Powered by <a target="_blank" href="//cryptonotemining.org"><i class="fa fa-github"></i> cryptonote-universal-pool</a>
|
||||
<span id="poolVersion"></span>
|
||||
open sourced under the <a href="http://www.gnu.org/licenses/gpl-2.0.html">GPL</a>
|
||||
</div>
|
||||
</footer>
|
||||
|
|
|
@ -157,19 +157,14 @@
|
|||
height: '75',
|
||||
lineColor: '#03a678',
|
||||
fillColor: 'rgba(3, 166, 120, .3)',
|
||||
spotColor: '#00bf00',
|
||||
minSpotColor: '#00bf00',
|
||||
maxSpotColor: '#00bf00',
|
||||
highlightLineColor: '#236d26',
|
||||
spotRadius: 3,
|
||||
// chartRangeMin: 0,
|
||||
spotColor: null,
|
||||
minSpotColor: null,
|
||||
maxSpotColor: null,
|
||||
highlightLineColor: '#236d26',
|
||||
spotRadius: 3,
|
||||
chartRangeMin: 0,
|
||||
drawNormalOnTop: false,
|
||||
tooltipFormat: '<b>{{y}}</b>, {{offset:names}}',
|
||||
tooltipValueLookups: {
|
||||
names: null
|
||||
}
|
||||
tooltipFormat: '<b>{{y}}</b>, {{offset:names}}'
|
||||
};
|
||||
|
||||
var userGraphStat = {
|
||||
|
@ -179,19 +174,14 @@
|
|||
height: '180',
|
||||
lineColor: '#03a678',
|
||||
fillColor: 'rgba(3, 166, 120, .3)',
|
||||
spotColor: '#00bf00',
|
||||
minSpotColor: '#00bf00',
|
||||
maxSpotColor: '#00bf00',
|
||||
highlightLineColor: '#236d26',
|
||||
spotRadius: 3,
|
||||
spotColor: null,
|
||||
minSpotColor: null,
|
||||
maxSpotColor: null,
|
||||
highlightLineColor: '#236d26',
|
||||
spotRadius: 3,
|
||||
drawNormalOnTop: false,
|
||||
chartRangeMin: 0,
|
||||
tooltipFormat: '<b>{{y}}</b>, {{offset:names}}',
|
||||
tooltipValueLookups: {
|
||||
names: null
|
||||
}
|
||||
tooltipFormat: '<b>{{y}}</b>, {{offset:names}}'
|
||||
},
|
||||
payments: {
|
||||
type: 'line',
|
||||
|
@ -199,19 +189,14 @@
|
|||
height: '180',
|
||||
lineColor: '#03a678',
|
||||
fillColor: 'rgba(3, 166, 120, .3)',
|
||||
spotColor: '#00bf00',
|
||||
minSpotColor: '#00bf00',
|
||||
maxSpotColor: '#00bf00',
|
||||
highlightLineColor: '#236d26',
|
||||
spotRadius: 3,
|
||||
spotColor: null,
|
||||
minSpotColor: null,
|
||||
maxSpotColor: null,
|
||||
highlightLineColor: '#236d26',
|
||||
spotRadius: 3,
|
||||
drawNormalOnTop: false,
|
||||
chartRangeMin: 0,
|
||||
tooltipFormat: '<b>{{y}}</b>, {{offset:names}}',
|
||||
tooltipValueLookups: {
|
||||
names: null
|
||||
}
|
||||
tooltipFormat: '<b>{{y}}</b>, {{offset:names}}'
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -349,19 +334,19 @@
|
|||
|
||||
|
||||
var totalFee = lastStats.config.fee;
|
||||
if (lastStats.config.doDonations){
|
||||
totalFee += lastStats.config.donation;
|
||||
totalFee += lastStats.config.coreDonation;
|
||||
var feeText = [];
|
||||
if (lastStats.config.donation > 0) feeText.push(lastStats.config.donation + '% to pool dev');
|
||||
if (lastStats.config.coreDonation > 0) feeText.push(lastStats.config.coreDonation + '% to core devs');
|
||||
updateText('poolDonations', feeText.join(', '));
|
||||
if (Object.keys(lastStats.config.donation).length) {
|
||||
var totalDonation = 0;
|
||||
for(var i in lastStats.config.donation) {
|
||||
totalDonation += lastStats.config.donation[i];
|
||||
}
|
||||
totalFee += totalDonation;
|
||||
updateText('poolDonations', floatToString(totalDonation) + '% to open-source devs');
|
||||
}
|
||||
else{
|
||||
$('#donations').hide()
|
||||
$('#donations').hide()
|
||||
}
|
||||
|
||||
updateText('poolFee', totalFee + '%');
|
||||
updateText('poolFee', floatToString(totalFee) + '%');
|
||||
|
||||
|
||||
updateText('blockSolvedTime', getReadableTime(lastStats.network.difficulty / lastStats.pool.hashrate));
|
||||
|
@ -374,11 +359,6 @@
|
|||
|
||||
$('#networkLastBlockFound,#poolLastBlockFound,#yourLastShare,#marketLastUpdated').timeago();
|
||||
|
||||
function getBlockchainUrl(id) {
|
||||
return blockchainExplorer.replace('{symbol}', lastStats.config.symbol.toLowerCase()).replace('{id}', id);
|
||||
}
|
||||
|
||||
|
||||
function getReadableTime(seconds){
|
||||
|
||||
var units = [ [60, 'second'], [60, 'minute'], [24, 'hour'],
|
||||
|
@ -464,10 +444,10 @@
|
|||
function calcEstimateProfit(){
|
||||
try {
|
||||
var rateUnit = Math.pow(1024,parseInt($('#calcHashUnit').data('mul')));
|
||||
var inp2 = parseFloat($('#calcHashRate').val()) * rateUnit;
|
||||
var resl = 16 / ((lastStats.network.difficulty / inp2) / 86400);
|
||||
if (!isNaN(resl)) {
|
||||
updateText('calcHashAmount', (Math.round(resl * 100) / 100).toString());
|
||||
var hashRate = parseFloat($('#calcHashRate').val()) * rateUnit;
|
||||
var profit = (hashRate * 86400 / lastStats.network.difficulty) * lastStats.network.reward;
|
||||
if (profit) {
|
||||
updateText('calcHashAmount', getReadableCoins(profit, 2, true));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -594,7 +574,7 @@
|
|||
for(var chart in userGraphStat) {
|
||||
if(data['charts'][chart] && data['charts'][chart].length) {
|
||||
var graphData = getGraphData(data['charts'][chart], chart == 'payments');
|
||||
userGraphStat[chart].tooltipValueLookups.names = graphData.names;
|
||||
userGraphStat[chart].tooltipValueLookups = {names: graphData.names};
|
||||
$('[data-chart=user_' + chart + ']').show().find('.chart').sparkline(graphData.values, userGraphStat[chart]);
|
||||
}
|
||||
}
|
||||
|
@ -659,10 +639,11 @@
|
|||
|
||||
for(var graphType in graphData) {
|
||||
if(graphData[graphType].values.length > 1) {
|
||||
currencyGraphStat.tooltipValueLookups.names = graphData[graphType].names;
|
||||
var settings = jQuery.extend({}, currencyGraphStat);
|
||||
settings.tooltipValueLookups = {names: graphData[graphType].names};
|
||||
var $chart = $('[data-chart=' + graphType + '] .chart');
|
||||
$chart.closest('.chartWrap').show();
|
||||
$chart.sparkline(graphData[graphType].values, currencyGraphStat);
|
||||
$chart.sparkline(graphData[graphType].values, settings);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue