Blockchain changes

This commit is contained in:
SuriyaR 2019-07-30 10:42:23 +05:30
parent 79b73cb741
commit 6a1a08f59d

View File

@ -865,35 +865,43 @@ export class BlockchainBlockController {
BlockchainBlockResult[BlockchainBlockResult.length - 1][
'target_difficulty_cuckaroo'
] =
] = BlockchainPreviousBlockFetchQuery &&
BlockchainPreviousBlockFetchQuery != undefined ?
(parseInt(lastElemt.blockchain_block_total_difficulty_cuckaroo)
? parseInt(lastElemt.blockchain_block_total_difficulty_cuckaroo)
: 0) -
parseInt(BlockchainPreviousBlockFetchQuery.TotalDifficultyCuckaroo);
(parseInt(BlockchainPreviousBlockFetchQuery.TotalDifficultyCuckaroo) ? parseInt(BlockchainPreviousBlockFetchQuery.TotalDifficultyCuckaroo) : 0)
: 0;
BlockchainBlockResult[BlockchainBlockResult.length - 1][
'target_difficulty_cuckatoo'
] =
] = BlockchainPreviousBlockFetchQuery &&
BlockchainPreviousBlockFetchQuery != undefined ?
(parseInt(lastElemt.blockchain_block_total_difficulty_cuckatoo)
? parseInt(lastElemt.blockchain_block_total_difficulty_cuckatoo)
: 0) -
parseInt(BlockchainPreviousBlockFetchQuery.TotalDifficultyCuckatoo);
(parseInt(BlockchainPreviousBlockFetchQuery.TotalDifficultyCuckatoo) ? parseInt(BlockchainPreviousBlockFetchQuery.TotalDifficultyCuckatoo) : 0)
: 0;
BlockchainBlockResult[BlockchainBlockResult.length - 1][
'target_difficulty_progpow'
] =
] = BlockchainPreviousBlockFetchQuery &&
BlockchainPreviousBlockFetchQuery != undefined ?
(parseInt(lastElemt.blockchain_block_total_difficulty_progpow)
? parseInt(lastElemt.blockchain_block_total_difficulty_progpow)
: 0) -
parseInt(BlockchainPreviousBlockFetchQuery.TotalDifficultyProgpow);
(parseInt(BlockchainPreviousBlockFetchQuery.TotalDifficultyProgpow) ? parseInt(BlockchainPreviousBlockFetchQuery.TotalDifficultyProgpow) : 0)
: 0;
BlockchainBlockResult[BlockchainBlockResult.length - 1][
'target_difficulty_randomx'
] =
] = BlockchainPreviousBlockFetchQuery &&
BlockchainPreviousBlockFetchQuery != undefined ?
(parseInt(lastElemt.blockchain_block_total_difficulty_randomx)
? parseInt(lastElemt.blockchain_block_total_difficulty_randomx)
: 0) -
parseInt(BlockchainPreviousBlockFetchQuery.TotalDifficultyRandomx);
(parseInt(BlockchainPreviousBlockFetchQuery.TotalDifficultyRandomx) ? parseInt(BlockchainPreviousBlockFetchQuery.TotalDifficultyRandomx) : 0)
: 0;
BlockchainBlockResult.forEach(e => {
var latest_block = this.dateDiff(e.blockchain_block_timestamp);