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}}

diff --git a/src/assets/css/style.css b/src/assets/css/style.css index 2f20c21..f9dc222 100644 --- a/src/assets/css/style.css +++ b/src/assets/css/style.css @@ -623,4 +623,5 @@ margin-right: 10px; vertical-align: middle; margin-top: -4px; } -.langbut:focus{outline: none;} \ No newline at end of file +.langbut:focus{outline: none;} +.difficulty_datas{font-size: 15px;} \ No newline at end of file