diff --git a/server/controllers/BlockchainBlock.ts b/server/controllers/BlockchainBlock.ts index 28a1edc..29215df 100644 --- a/server/controllers/BlockchainBlock.ts +++ b/server/controllers/BlockchainBlock.ts @@ -1327,14 +1327,14 @@ export class BlockchainBlockController { const BlockchainLatestBlockQuery = await getConnection() .query( - 'SELECT timestamp,height,edge_bits,hash,secondary_scaling, previous_id, total_difficulty FROM blockchain_block ORDER BY timestamp DESC LIMIT 1', + 'SELECT timestamp,height,edge_bits,hash,secondary_scaling, previous_id, total_difficulty_cuckaroo, total_difficulty_cuckatoo, total_difficulty_progpow, total_difficulty_randomx FROM blockchain_block ORDER BY timestamp DESC LIMIT 1', ) .catch(err_msg => { next(err_msg); }); const BlockchainPreviousBlockQuery = await getConnection() .query( - 'SELECT total_difficulty FROM blockchain_block WHERE hash=' + + 'SELECT total_difficulty_cuckaroo, total_difficulty_cuckatoo, total_difficulty_progpow, total_difficulty_randomx FROM blockchain_block WHERE hash=' + "'" + BlockchainLatestBlockQuery[0].previous_id + "'", @@ -1450,9 +1450,18 @@ export class BlockchainBlockController { } if (BlockchainLatestBlockQuery[0].previous_id) { - var targetdifficulty = - BlockchainLatestBlockQuery[0].total_difficulty - - BlockchainPreviousBlockQuery[0].total_difficulty; + var targetdifficultycuckaroo = + BlockchainLatestBlockQuery[0].total_difficulty_cuckaroo - + BlockchainPreviousBlockQuery[0].total_difficulty_cuckaroo; + var targetdifficultycuckatoo = + BlockchainLatestBlockQuery[0].total_difficulty_cuckatoo - + BlockchainPreviousBlockQuery[0].total_difficulty_cuckatoo; + var targetdifficultyprogpow = + BlockchainLatestBlockQuery[0].total_difficulty_progpow - + BlockchainPreviousBlockQuery[0].total_difficulty_progpow; + var targetdifficultyrandomx = + BlockchainLatestBlockQuery[0].total_difficulty_randomx - + BlockchainPreviousBlockQuery[0].total_difficulty_randomx; } block_height = BlockchainLatestBlockQuery[0].height; @@ -1467,7 +1476,10 @@ export class BlockchainBlockController { letest_block_duration, coin_existence, difficulty, - targetdifficulty, + targetdifficultycuckaroo, + targetdifficultycuckatoo, + targetdifficultyprogpow, + targetdifficultyrandomx }, }); } catch (error) { diff --git a/src/app/view/home/block-detail-list/block-detail-list.component.html b/src/app/view/home/block-detail-list/block-detail-list.component.html index cc091d9..164bcdd 100644 --- a/src/app/view/home/block-detail-list/block-detail-list.component.html +++ b/src/app/view/home/block-detail-list/block-detail-list.component.html @@ -39,7 +39,7 @@
{{latestblockdetail.difficulty | number}} / {{latestblockdetail.targetdifficulty | number}}
+Cuckaroo : {{latestblockdetail.targetdifficultycuckaroo | number}},Cuckatoo : {{latestblockdetail.targetdifficultycuckatoo | number}},ProgPow : {{latestblockdetail.targetdifficultyprogpow | number}},RandomX : {{latestblockdetail.targetdifficultyrandomx | number}}
{{'home.LATEST_BLOCK1' | translate}}