Merge branch 'master' of gitlab.com:epic-tech/explorer2.epic.tech-angular8

This commit is contained in:
vijikannan 2019-07-30 17:58:33 +05:30
commit c8a3dfca29
3 changed files with 21 additions and 8 deletions

View File

@ -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) {

View File

@ -39,7 +39,7 @@
</div>
<div class="col-md-3">
<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>
</div>
</div>

View File

@ -623,4 +623,5 @@ margin-right: 10px;
vertical-align: middle;
margin-top: -4px;
}
.langbut:focus{outline: none;}
.langbut:focus{outline: none;}
.difficulty_datas{font-size: 15px;}