diff --git a/app/utils.js b/app/utils.js index ef65290..f5223ba 100644 --- a/app/utils.js +++ b/app/utils.js @@ -6,6 +6,9 @@ var coins = require("./coins.js"); var coinConfig = coins[config.coin]; var exponentScales = [ + {val:1000000000000000000000000000000000, name:"?", abbreviation:"V", exponent:"33"}, + {val:1000000000000000000000000000000, name:"?", abbreviation:"W", exponent:"30"}, + {val:1000000000000000000000000000, name:"?", abbreviation:"X", exponent:"27"}, {val:1000000000000000000000000, name:"yotta", abbreviation:"Y", exponent:"24"}, {val:1000000000000000000000, name:"zetta", abbreviation:"Z", exponent:"21"}, {val:1000000000000000000, name:"exa", abbreviation:"E", exponent:"18"}, diff --git a/views/includes/block-content.pug b/views/includes/block-content.pug index 924c398..134d7e9 100644 --- a/views/includes/block-content.pug +++ b/views/includes/block-content.pug @@ -90,7 +90,7 @@ div(class="tab-content") br span(class="text-muted") (#{new Decimal(100 * result.getblock.weight / coinConfig.maxBlockWeight).toDecimalPlaces(2)}% full) - tr + tr(class="border-bottom") th(class="table-active properties-header") Confirmations td(class="monospace") if (result.getblock.confirmations < 6) @@ -143,9 +143,17 @@ div(class="tab-content") th(class="table-active text-right") Merkle Root td(class="monospace word-wrap") #{result.getblock.merkleroot} - tr(class="border-bottom") + tr th(class="table-active text-right") Chainwork - td(class="monospace word-wrap") #{result.getblock.chainwork} + td(class="monospace word-wrap") #{result.getblock.chainwork.replace(/^0+/, '')} + br + - var chainworkData = utils.formatLargeNumber(parseInt("0x" + result.getblock.chainwork), 2); + span(class="text-muted") + span (~ + span #{chainworkData[0]} + span x 10 + sup #{chainworkData[1].exponent} + span hashes) tr(class="border-bottom") th(class="table-active text-right") Miner diff --git a/views/index.pug b/views/index.pug index bcd0d89..8fb2280 100644 --- a/views/index.pug +++ b/views/index.pug @@ -47,8 +47,7 @@ block content - var hashrateData = utils.formatLargeNumber(miningInfo.networkhashps, 3); td span #{hashrateData[0]} - span(title=(hashrateData[1].name + "-hash / x10^" + hashrateData[1].exponent), data-toggle="tooltip") #{hashrateData[1].abbreviation}H - span /s + span(title=(hashrateData[1].name + "-hash / x10^" + hashrateData[1].exponent), data-toggle="tooltip") #{hashrateData[1].abbreviation}H/s td #{utils.formatBytes(getblockchaininfo.size_on_disk)} span(class="text-muted") (pruned: #{getblockchaininfo.pruned})