From cfdb9121656fe69db79f6d308e9f02c73764ff6b Mon Sep 17 00:00:00 2001 From: SuriyaR Date: Tue, 26 May 2020 10:52:42 +0200 Subject: [PATCH] new changes --- server/controllers/BlockchainBlock.ts | 8 ++++---- server/utils/common.ts | 11 +++++++++-- src/environments/environment.prod.ts | 1 + src/environments/environment.ts | 1 + 4 files changed, 15 insertions(+), 6 deletions(-) diff --git a/server/controllers/BlockchainBlock.ts b/server/controllers/BlockchainBlock.ts index 3f4c0ee..5d9f6bf 100644 --- a/server/controllers/BlockchainBlock.ts +++ b/server/controllers/BlockchainBlock.ts @@ -922,7 +922,7 @@ export class BlockchainBlockController { BlockchainBlockFetchQuery['Timestamp'] = moment .utc(BlockchainBlockFetchQuery['Timestamp']) .utc() - .format('MM-DD-YYYY, HH:MM:SS UTC'); + .format('MM-DD-YYYY, HH:mm:ss UTC'); BlockchainBlockFetchQuery['hashstart'] = BlockchainBlockFetchQuery[ 'Hash' @@ -1061,9 +1061,9 @@ export class BlockchainBlockController { 'blockchain_block.total_difficulty_randomx - LAG(blockchain_block.total_difficulty_randomx) OVER (ORDER BY blockchain_block.total_difficulty_randomx) AS target_difficulty_randomx', 'blockchain_block.Height', 'blockchain_block.EdgeBits', - 'COUNT(DISTINCT(blockchain_input.block_id)) AS input_count', - 'COUNT(DISTINCT(blockchain_kernel.block_id)) AS kernal_count', - 'COUNT(DISTINCT(blockchain_output.block_id)) AS output_count', + 'COUNT(DISTINCT(blockchain_input.data)) AS input_count', + 'COUNT(DISTINCT(blockchain_kernel.excess_sig)) AS kernal_count', + 'COUNT(DISTINCT(blockchain_output.commit)) AS output_count', 'blockchain_block.Proof As PoWAlgo', ]) // .addSelect( diff --git a/server/utils/common.ts b/server/utils/common.ts index c90590c..b28a660 100644 --- a/server/utils/common.ts +++ b/server/utils/common.ts @@ -2,6 +2,9 @@ import { getConnection, AdvancedConsoleLogger } from "typeorm"; import { Global } from "../global"; import { async } from '@angular/core/testing'; +const { promisify } = require('util'); +const exec = promisify(require('child_process').exec) + function convertMinsToHrmin (millseconds,insec) { var seconds = Math.floor(millseconds / 1000); if(insec){ @@ -246,6 +249,9 @@ const latestBlockDetails = async()=> { return(err_msg); }); + const space = await exec('du -sh /root/.epic/main/'); + let disk_space = space.stdout.split('\t')[0]; + let height = BlockchainLatestBlockQuery[0].height; var coin_existence; // if (height > 12960) { @@ -500,7 +506,8 @@ let currentReward = 16; cuckoohashrate, progpowhashrate, randomxhashrate, - totalFoundationReward + totalFoundationReward, + diskSpace:disk_space }; } @@ -638,4 +645,4 @@ export {network_hashrate}; export {averageblockdifficulty}; export {latestBlockDetails}; export {GetBlocktime}; -export {Details}; \ No newline at end of file +export {Details}; diff --git a/src/environments/environment.prod.ts b/src/environments/environment.prod.ts index 2252689..cb37641 100644 --- a/src/environments/environment.prod.ts +++ b/src/environments/environment.prod.ts @@ -2,4 +2,5 @@ export const environment = { production: true, domain: '/', apiUrl: '/epic_explorer/v1', + EMAIL : 'contact@epic.tech' }; diff --git a/src/environments/environment.ts b/src/environments/environment.ts index ca7d702..4696f83 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -6,6 +6,7 @@ export const environment = { production: false, domain: 'https://explorer.epic.tech/', apiUrl: 'https://explorer.epic.tech/epic_explorer/v1', + EMAIL : 'contact@epic.tech' }; /*