This commit is contained in:
blaze 2019-08-07 18:21:08 +05:30
commit 4ac6adee4d

View File

@ -1218,6 +1218,10 @@ export class BlockchainBlockController {
TargetDifficulty.push(parseInt(e.tarket_difficulty)); 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({ response.status(200).json({
status: 200, status: 200,
timestamp: Date.now(), timestamp: Date.now(),
@ -1227,6 +1231,8 @@ export class BlockchainBlockController {
// DifficultyCuckaroo: DifficultyCuckaroo, // DifficultyCuckaroo: DifficultyCuckaroo,
// DifficultyCuckatoo: DifficultyCuckatoo, // DifficultyCuckatoo: DifficultyCuckatoo,
// DifficultyProgpow: DifficultyProgpow, // DifficultyProgpow: DifficultyProgpow,
Maxrange: Maxrange,
Minrange: (Minrange * 0.3),
TargetDifficulty: TargetDifficulty TargetDifficulty: TargetDifficulty
}, },
}); });