diff --git a/app/coins/btc.js b/app/coins/btc.js index 75009d2..6f15f64 100644 --- a/app/coins/btc.js +++ b/app/coins/btc.js @@ -10,6 +10,7 @@ module.exports = { nodeUrl:"https://bitcoin.org/en/full-node", demoSiteUrl: "https://btc.chaintools.io", miningPoolsConfigUrl:"https://raw.githubusercontent.com/blockchain/Blockchain-Known-Pools/master/pools.json", + maxBlockWeight: 4000000, currencyUnits:[ { name:"BTC", diff --git a/app/coins/ltc.js b/app/coins/ltc.js index 0f5f071..96c446a 100644 --- a/app/coins/ltc.js +++ b/app/coins/ltc.js @@ -9,6 +9,7 @@ module.exports = { nodeUrl:"https://litecoin.org/", demoSiteUrl: "https://ltc.chaintools.io", miningPoolsConfigUrl:"https://raw.githubusercontent.com/hashstream/pools/master/pools.json", + maxBlockWeight: 4000000, currencyUnits:[ { name:"LTC", diff --git a/views/includes/block-content.pug b/views/includes/block-content.pug index e92e1af..95239d9 100644 --- a/views/includes/block-content.pug +++ b/views/includes/block-content.pug @@ -155,8 +155,6 @@ div(class="tab-content") th(class="table-active text-right") Chainwork td(class="monospace word-wrap") #{result.getblock.chainwork} - hr - div(class="card mb-3") div(class="card-header") div(class="row") diff --git a/views/includes/blocks-list.pug b/views/includes/blocks-list.pug index b01e846..a45473e 100644 --- a/views/includes/blocks-list.pug +++ b/views/includes/blocks-list.pug @@ -5,11 +5,15 @@ table(class="table table-striped table-responsive-sm") th(class="data-header") Height th(class="data-header") Timestamp (utc) th(class="data-header text-right") Age - th(class="data-header") Miner + th(class="data-header") Miner + a(data-toggle="tooltip", title=("Hover text below for details")) + i(class="fas fa-info-circle") th(class="data-header text-right") Transactions th(class="data-header text-right") Average Fee th(class="data-header text-right") Size (bytes) - th(class="data-header text-right") Weight (wu) + th(class="data-header text-right") Weight (wu) + a(data-toggle="tooltip", title=("Hover text below for % full")) + i(class="fas fa-info-circle") tbody each block, blockIndex in blocks if (block) @@ -33,6 +37,7 @@ table(class="table table-striped table-responsive-sm") td(class="data-cell monospace text-right") - var currencyValue = new Decimal(block.totalFees).dividedBy(block.tx.length); include ./value-display.pug - + td(class="data-cell monospace text-right") #{block.size.toLocaleString()} - td(class="data-cell monospace text-right") #{block.weight.toLocaleString()} \ No newline at end of file + td(class="data-cell monospace text-right") + span(title=(new Decimal(100 * block.weight / coinConfig.maxBlockWeight).toDecimalPlaces(2) + "% full"), data-toggle="tooltip") #{block.weight.toLocaleString()} \ No newline at end of file diff --git a/views/includes/value-display.pug b/views/includes/value-display.pug index 4406517..addbc0c 100644 --- a/views/includes/value-display.pug +++ b/views/includes/value-display.pug @@ -1,5 +1,8 @@ -span(class="monospace") #{utils.formatCurrencyAmount(currencyValue, currencyFormatType)} - if (global.exchangeRate) - span - span(data-toggle="tooltip", title=utils.formatExchangedCurrency(currencyValue)) - i(class="fas fa-exchange-alt") \ No newline at end of file +if (currencyValue > 0) + span(class="monospace") #{utils.formatCurrencyAmount(currencyValue, currencyFormatType)} + if (global.exchangeRate) + span + span(data-toggle="tooltip", title=utils.formatExchangedCurrency(currencyValue)) + i(class="fas fa-exchange-alt") +else + span(class="monospace") 0 \ No newline at end of file