From 54ea76c4a7f2eaa1e910c8a0a2e5ec9dcb04b6b8 Mon Sep 17 00:00:00 2001 From: "raja.blaze" Date: Wed, 7 Aug 2019 17:58:41 +0530 Subject: [PATCH] range --- server/controllers/BlockchainBlock.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/server/controllers/BlockchainBlock.ts b/server/controllers/BlockchainBlock.ts index c0f88cc..9d83e8f 100644 --- a/server/controllers/BlockchainBlock.ts +++ b/server/controllers/BlockchainBlock.ts @@ -1218,6 +1218,10 @@ export class BlockchainBlockController { TargetDifficulty.push(parseInt(e.tarket_difficulty)); }); + var Maxrange = Math.max.apply(Math, TotalDifficultyNBlockQuery.map(function(o) { return o.tarket_difficulty; })); + var Minrange = Math.min.apply(Math, TotalDifficultyNBlockQuery.map(function(o) { return o.tarket_difficulty; })); + // Minrange = parseInt(Minrange); + // var Minrange2 = parseInt(Minrange * 0.3); response.status(200).json({ status: 200, timestamp: Date.now(), @@ -1227,6 +1231,8 @@ export class BlockchainBlockController { // DifficultyCuckaroo: DifficultyCuckaroo, // DifficultyCuckatoo: DifficultyCuckatoo, // DifficultyProgpow: DifficultyProgpow, + Maxrange: Maxrange, + Minrange: (Minrange * 0.3), TargetDifficulty: TargetDifficulty }, });