|
|
|
@ -153,13 +153,13 @@ app.get('/pool/ports', function (req, res) {
|
|
|
|
|
app.get('/pool/blocks/:pool_type', function (req, res) {
|
|
|
|
|
let limit = typeof(req.query.limit) !== 'undefined' ? Number(req.query.limit) : 25;
|
|
|
|
|
let page = typeof(req.query.page) !== 'undefined' ? Number(req.query.page) : 0;
|
|
|
|
|
res.json(global.database.getBlockList(req.params.pool_type).slice(page, page + limit + 1));
|
|
|
|
|
res.json(global.database.getBlockList(req.params.pool_type).slice(page*limit, page * (limit + 1) + 1));
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
app.get('/pool/blocks', function (req, res) {
|
|
|
|
|
let limit = typeof(req.query.limit) !== 'undefined' ? Number(req.query.limit) : 25;
|
|
|
|
|
let page = typeof(req.query.page) !== 'undefined' ? Number(req.query.page) : 0;
|
|
|
|
|
res.json(global.database.getBlockList().slice(page, page + limit + 1));
|
|
|
|
|
res.json(global.database.getBlockList().slice(page*limit, page * (limit + 1) + 1));
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
app.get('/pool/payments/:pool_type', function (req, res) {
|
|
|
|
@ -300,7 +300,7 @@ app.get('/miner/:address/payments', function (req, res) {
|
|
|
|
|
|
|
|
|
|
app.get('/miner/:address/stats/allWorkers', function (req, res) {
|
|
|
|
|
let address = req.params.address;
|
|
|
|
|
let identifiers = global.database.getCache(address + '_identifiers')
|
|
|
|
|
let identifiers = global.database.getCache(address + '_identifiers');
|
|
|
|
|
let globalCache = global.database.getCache(address);
|
|
|
|
|
let returnData = {global: {
|
|
|
|
|
lts: Math.floor(globalCache.lastHash / 1000),
|
|
|
|
|