This commit is contained in:
Prema 2019-08-28 12:07:53 +05:30
commit 980c82e2a6
2 changed files with 39 additions and 39 deletions

View File

@ -394,41 +394,41 @@ export class BlockchainBlockController {
this.BlockPieChart,
);
/**
* @swagger
* /epic_explorer/v1/blockchain_block/hashrate:
* get:
* tags:
* - name: BLOCKCHAIN_BLOCK | BLOCKCHAIN_BLOCK CONTROLLER
* description: To get Hash Rate of AR29 abd AT31
* summary: To get Hash Rate of AR29 abd AT31
* consumes:
* - application/json
* produces:
* - application/json
* parameters:
* - name: FromDate
* description: Enter the From date
* in: query
* type: string
* - name: ToDate
* description: Enter the To date
* in: query
* type: string
* - name: Interval
* description: Try to give Intevals such as 1 week/ 15 days/ 30 days/ 60 days/ 3 months
* in: query
* type: string
* responses:
* 200:
* description: Hash Rate of AR29 abd AT31 fetched successfully
*/
this.router.get(
`${this.path}/hashrate`,
validationMiddleware(TotalDifficultyNBlockDto, true),
redisMiddleware(process.env.REDIS_EXPIRY),
this.HashRate,
);
// /**
// * @swagger
// * /epic_explorer/v1/blockchain_block/hashrate:
// * get:
// * tags:
// * - name: BLOCKCHAIN_BLOCK | BLOCKCHAIN_BLOCK CONTROLLER
// * description: To get Hash Rate of AR29 abd AT31
// * summary: To get Hash Rate of AR29 abd AT31
// * consumes:
// * - application/json
// * produces:
// * - application/json
// * parameters:
// * - name: FromDate
// * description: Enter the From date
// * in: query
// * type: string
// * - name: ToDate
// * description: Enter the To date
// * in: query
// * type: string
// * - name: Interval
// * description: Try to give Intevals such as 1 week/ 15 days/ 30 days/ 60 days/ 3 months
// * in: query
// * type: string
// * responses:
// * 200:
// * description: Hash Rate of AR29 abd AT31 fetched successfully
// */
// this.router.get(
// `${this.path}/hashrate`,
// validationMiddleware(TotalDifficultyNBlockDto, true),
// redisMiddleware(process.env.REDIS_EXPIRY),
// this.HashRate,
// );
/**
* @swagger

View File

@ -720,10 +720,10 @@ sum(bk.block_id_count) AS kernal_count, \
LEFT JOIN (select block_id, count(block_id) as block_id_count from blockchain_input group by block_id) as bi \
ON blockchain_block.hash = \
bi.block_id \
LEFT JOIN (select block_id, count(block_id) as block_id_count from blockchain_kernel group by block_id) as bk \
LEFT JOIN (select block_id, count(block_id) as block_id_count from blockchain_kernel where features != 'Coinbase' group by block_id) as bk \
ON blockchain_block.hash = \
bk.block_id \
LEFT JOIN (select block_id, count(block_id) as block_id_count from blockchain_output group by block_id) as bo \
LEFT JOIN (select block_id, count(block_id) as block_id_count from blockchain_output where output_type != 'Coinbase' group by block_id) as bo \
ON blockchain_block.hash = \
bo.block_id WHERE blockchain_block.timestamp >= '" +
fromdate +
@ -858,10 +858,10 @@ sum(bk.block_id_count) AS kernal_count, \
LEFT JOIN (select block_id, count(block_id) as block_id_count from blockchain_input group by block_id) as bi \
ON blockchain_block.hash = \
bi.block_id \
LEFT JOIN (select block_id, count(block_id) as block_id_count from blockchain_kernel group by block_id) as bk \
LEFT JOIN (select block_id, count(block_id) as block_id_count from blockchain_kernel where features != 'Coinbase' group by block_id) as bk \
ON blockchain_block.hash = \
bk.block_id \
LEFT JOIN (select block_id, count(block_id) as block_id_count from blockchain_output group by block_id) as bo \
LEFT JOIN (select block_id, count(block_id) as block_id_count from blockchain_output where output_type != 'Coinbase' group by block_id) as bo \
ON blockchain_block.hash = \
bo.block_id WHERE " +
timeIntervalQry +