Changes in list

This commit is contained in:
SuriyaR 2019-07-30 17:16:26 +05:30
parent fdbe194b3f
commit 88a1961f9e
4 changed files with 22 additions and 9 deletions

View File

@ -1330,14 +1330,14 @@ export class BlockchainBlockController {
const BlockchainLatestBlockQuery = await getConnection() const BlockchainLatestBlockQuery = await getConnection()
.query( .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 => { .catch(err_msg => {
next(err_msg); next(err_msg);
}); });
const BlockchainPreviousBlockQuery = await getConnection() const BlockchainPreviousBlockQuery = await getConnection()
.query( .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 + BlockchainLatestBlockQuery[0].previous_id +
"'", "'",
@ -1453,9 +1453,18 @@ export class BlockchainBlockController {
} }
if (BlockchainLatestBlockQuery[0].previous_id) { if (BlockchainLatestBlockQuery[0].previous_id) {
var targetdifficulty = var targetdifficultycuckaroo =
BlockchainLatestBlockQuery[0].total_difficulty - BlockchainLatestBlockQuery[0].total_difficulty_cuckaroo -
BlockchainPreviousBlockQuery[0].total_difficulty; 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; block_height = BlockchainLatestBlockQuery[0].height;
@ -1470,7 +1479,10 @@ export class BlockchainBlockController {
letest_block_duration, letest_block_duration,
coin_existence, coin_existence,
difficulty, difficulty,
targetdifficulty, targetdifficultycuckaroo,
targetdifficultycuckatoo,
targetdifficultyprogpow,
targetdifficultyrandomx
}, },
}); });
} catch (error) { } catch (error) {

View File

@ -39,7 +39,7 @@
</div> </div>
<div class="col-md-3"> <div class="col-md-3">
<div class="text-center detail_div minhgt"> <div class="text-center detail_div minhgt">
<p class="count mb-0">{{latestblockdetail.difficulty | number}} / {{latestblockdetail.targetdifficulty | number}}</p> <p class="count difficulty_datas mb-0">Cuckaroo : {{latestblockdetail.targetdifficultycuckaroo | number}},Cuckatoo : {{latestblockdetail.targetdifficultycuckatoo | number}},ProgPow : {{latestblockdetail.targetdifficultyprogpow | number}},RandomX : {{latestblockdetail.targetdifficultyrandomx | number}}</p>
<p class="mb-0 desc">{{'home.LATEST_BLOCK1' | translate}}</p> <p class="mb-0 desc">{{'home.LATEST_BLOCK1' | translate}}</p>
</div> </div>
</div> </div>

View File

@ -52,7 +52,7 @@
<div class="block_div"><h6>Difficulty</h6><span class="blck_value">{{ hashvalue.target_difficulty | number }}</span></div> <div class="block_div"><h6>Difficulty</h6><span class="blck_value">{{ hashvalue.target_difficulty | number }}</span></div>
</div> </div>
<div class="col-6 col-sm-6 col-md-3 tble_col"> <div class="col-6 col-sm-6 col-md-3 tble_col">
<div class="block_div"><h6 class="mb-0">Pow Algo</h6><span class="blck_value">{{ hashvalue.PoWAlgo }}</span></div> <div class="block_div"><h6 class="mb-0">Pow Algo</h6><span class="blck_value">{{ hashvalue.powalgo }}</span></div>
</div> </div>
<div class="col-6 col-sm-6 col-md-3 tble_col"> <div class="col-6 col-sm-6 col-md-3 tble_col">
<div class="block_div"><h6>#{{'home.INPUTS' | translate}}</h6><span class="blck_value">{{ hashvalue.input_count }}</span></div> <div class="block_div"><h6>#{{'home.INPUTS' | translate}}</h6><span class="blck_value">{{ hashvalue.input_count }}</span></div>

View File

@ -624,3 +624,4 @@ margin-right: 10px;
margin-top: -4px; margin-top: -4px;
} }
.langbut:focus{outline: none;} .langbut:focus{outline: none;}
.difficulty_datas{font-size: 15px;}