From 4902c0d0555c7fbcf6a97f1e75dec5a3cb7ec29e Mon Sep 17 00:00:00 2001 From: root Date: Thu, 8 Aug 2019 12:06:56 +0530 Subject: [PATCH] Socket Live data --- server/controllers/BlockchainBlock.ts | 9 ++++++--- server/socket/block.ts | 4 ++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/server/controllers/BlockchainBlock.ts b/server/controllers/BlockchainBlock.ts index a05a04a..072276c 100644 --- a/server/controllers/BlockchainBlock.ts +++ b/server/controllers/BlockchainBlock.ts @@ -1139,9 +1139,11 @@ export class BlockchainBlockController { var alog_type = TotalDifficultyNBlockRequestData.Type; var Difftype = TotalDifficultyNBlockRequestData.Difftype; if (TotalDifficultyNBlockRequestData.Interval && TotalDifficultyNBlockRequestData.Interval != '1 day') { - var dateFormat = 'YYYY-MM-DD'; + var dateFormat = 'YYYY-MM-DD HH:mm:ss'; + var tickFormat = '%m-%d'; }else{ - var dateFormat = 'HH:mm'; + var dateFormat = 'YYYY-MM-DD HH:mm:ss'; + var tickFormat = '%H-%M'; } if(Difftype == "target"){ var TotalDifficultyNBlockQuery = await getConnection() @@ -1233,7 +1235,8 @@ export class BlockchainBlockController { // DifficultyProgpow: DifficultyProgpow, Maxrange: Maxrange, Minrange: (Minrange * 0.2), - TargetDifficulty: TargetDifficulty + TargetDifficulty: TargetDifficulty, + tickFormat: tickFormat }, }); } catch (error) { diff --git a/server/socket/block.ts b/server/socket/block.ts index 7f97f54..bdc78a8 100644 --- a/server/socket/block.ts +++ b/server/socket/block.ts @@ -198,11 +198,11 @@ export async function universalGetLatestBlockDetails(socket) { TotalCuckoo, age : dateTimeDurationString, input_count: BlockchainLatestBlockQuery[0].input_count, - kernal_count: BlockchainLatestBlockQuery[0].kernal_count, + kernel_count: BlockchainLatestBlockQuery[0].kernel_count, output_count: BlockchainLatestBlockQuery[0].output_count, proof: BlockchainLatestBlockQuery[0].proof, hasharray: hasharray, - Difficulty: Difficulty, + // Difficulty: Difficulty, hashstart:BlockchainLatestBlockQuery[0].hash.slice(0, 2), hashend:BlockchainLatestBlockQuery[0].hash.slice(62,64), TotalDifficultyCuckaroo: