Add PoW and difficulty to block info page

master
stoffu 6 years ago
parent fd4f57282a
commit 3c770f4d43
No known key found for this signature in database
GPG Key ID: 41DAB8343A9EC012

@ -1175,6 +1175,10 @@ public:
_blk_height, current_blockchain_height);
// initalise page tempate map with basic info about blockchain
string blk_pow_hash_str = pod_to_hex(get_block_longhash(blk, _blk_height));
uint64_t blk_difficulty = core_storage->get_db().get_block_difficulty(_blk_height);
mstch::map context {
{"testnet" , testnet},
{"stagenet" , stagenet},
@ -1192,6 +1196,8 @@ public:
{"blk_age" , age.first},
{"delta_time" , delta_time},
{"blk_nonce" , blk.nonce},
{"blk_pow_hash" , blk_pow_hash_str},
{"blk_difficulty" , blk_difficulty},
{"age_format" , age.second},
{"major_ver" , std::to_string(blk.major_version)},
{"minor_ver" , std::to_string(blk.minor_version)},

@ -30,6 +30,11 @@
<td>Total fees:</td><td>{{sum_fees}}</td>
<td>No of txs:</td><td>{{no_txs}}</td>
</tr>
<tr>
<td>PoW hash:</td><td>{{blk_pow_hash}}</td>
<td>Difficulty:</td><td>{{blk_difficulty}}</td>
<td></td>
</tr>
</table>
<h3>Miner reward transaction</h3>

Loading…
Cancel
Save