time taken updated

This commit is contained in:
raja.blaze 2019-09-11 10:59:02 +05:30
parent 1ff0b0062d
commit 70d4d3f0cb
2 changed files with 4 additions and 0 deletions

View File

@ -316,6 +316,7 @@ export async function universalGetLatestBlockDetails(current_network) {
'blockchain_block.TotalDifficultyProgpow', 'blockchain_block.TotalDifficultyProgpow',
'blockchain_block.TotalDifficultyRandomx', 'blockchain_block.TotalDifficultyRandomx',
'blockchain_block.previous_id', 'blockchain_block.previous_id',
'EXTRACT(EPOCH FROM (blockchain_block.timestamp - LAG(blockchain_block.timestamp) OVER (ORDER BY blockchain_block.timestamp))) as timetaken',
'blockchain_block.total_difficulty_cuckaroo - LAG(blockchain_block.total_difficulty_cuckaroo) OVER (ORDER BY blockchain_block.total_difficulty_cuckaroo) AS target_difficulty_cuckaroo', 'blockchain_block.total_difficulty_cuckaroo - LAG(blockchain_block.total_difficulty_cuckaroo) OVER (ORDER BY blockchain_block.total_difficulty_cuckaroo) AS target_difficulty_cuckaroo',
'blockchain_block.total_difficulty_cuckatoo - LAG(blockchain_block.total_difficulty_cuckatoo) OVER (ORDER BY blockchain_block.total_difficulty_cuckatoo) AS target_difficulty_cuckatoo', 'blockchain_block.total_difficulty_cuckatoo - LAG(blockchain_block.total_difficulty_cuckatoo) OVER (ORDER BY blockchain_block.total_difficulty_cuckatoo) AS target_difficulty_cuckatoo',
'blockchain_block.total_difficulty_progpow - LAG(blockchain_block.total_difficulty_progpow) OVER (ORDER BY blockchain_block.total_difficulty_progpow) AS target_difficulty_progpow', 'blockchain_block.total_difficulty_progpow - LAG(blockchain_block.total_difficulty_progpow) OVER (ORDER BY blockchain_block.total_difficulty_progpow) AS target_difficulty_progpow',

View File

@ -17,6 +17,9 @@
<div class="col-6 col-md-3 tble_col"> <div class="col-6 col-md-3 tble_col">
<div class="block_div"><h6 >Age</h6><span class="blck_value">{{ blockdetails.age }}</span></div> <div class="block_div"><h6 >Age</h6><span class="blck_value">{{ blockdetails.age }}</span></div>
</div> </div>
<div class="col-6 col-md-3 tble_col">
<div class="block_div"><h6 >Time Taken(Sec)</h6><span class="blck_value">{{ blockdetails.timetaken }}</span></div>
</div>
<div class="col-6 col-md-3 tble_col"> <div class="col-6 col-md-3 tble_col">
<div class="block_div"><h6>Difficulty</h6><span class="blck_value">{{(blockdetails.PoWAlgo == 'Cuckoo') ? (blockdetails.target_difficulty_cuckatoo | number) : (blockdetails.PoWAlgo == 'RandomX') ? (blockdetails.target_difficulty_randomx | number) : (blockdetails.PoWAlgo == 'ProgPow') ? (blockdetails.target_difficulty_progpow | number) : 0}}</span></div> <div class="block_div"><h6>Difficulty</h6><span class="blck_value">{{(blockdetails.PoWAlgo == 'Cuckoo') ? (blockdetails.target_difficulty_cuckatoo | number) : (blockdetails.PoWAlgo == 'RandomX') ? (blockdetails.target_difficulty_randomx | number) : (blockdetails.PoWAlgo == 'ProgPow') ? (blockdetails.target_difficulty_progpow | number) : 0}}</span></div>
</div> </div>