From 88a1961f9e1ea6dff94de98b3e6e420cb9a289dc Mon Sep 17 00:00:00 2001 From: SuriyaR Date: Tue, 30 Jul 2019 17:16:26 +0530 Subject: [PATCH] Changes in list --- server/controllers/BlockchainBlock.ts | 24 ++++++++++++++----- .../block-detail-list.component.html | 2 +- .../latestblocks/latestblocks.component.html | 2 +- src/assets/css/style.css | 3 ++- 4 files changed, 22 insertions(+), 9 deletions(-) diff --git a/server/controllers/BlockchainBlock.ts b/server/controllers/BlockchainBlock.ts index e712166..f840992 100644 --- a/server/controllers/BlockchainBlock.ts +++ b/server/controllers/BlockchainBlock.ts @@ -1330,14 +1330,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 + "'", @@ -1453,9 +1453,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; @@ -1470,7 +1479,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/app/view/home/latestblocks/latestblocks.component.html b/src/app/view/home/latestblocks/latestblocks.component.html index 8ba90ab..1b7b721 100644 --- a/src/app/view/home/latestblocks/latestblocks.component.html +++ b/src/app/view/home/latestblocks/latestblocks.component.html @@ -52,7 +52,7 @@
Difficulty
{{ hashvalue.target_difficulty | number }}
-
Pow Algo
{{ hashvalue.PoWAlgo }}
+
Pow Algo
{{ hashvalue.powalgo }}
#{{'home.INPUTS' | translate}}
{{ hashvalue.input_count }}
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