Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ABLA support #197

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,8 @@ See `bch-rpc-explorer --help` for the full list of CLI options.

* [bitcoincash:pq6snv5fcx2fp6dlzg7s0m9zs8yqh74335tzvvfcmq](bitcoincash:pq6snv5fcx2fp6dlzg7s0m9zs8yqh74335tzvvfcmq)


[npm-ver-img]: https://img.shields.io/npm/v/bch-rpc-explorer.svg?style=flat
[npm-ver-url]: https://www.npmjs.com/package/bch-rpc-explorer
[npm-dl-img]: http://img.shields.io/npm/dm/bch-rpc-explorer.svg?style=flat
[npm-dl-img]: https://img.shields.io/npm/dm/bch-rpc-explorer.svg?style=flat
[npm-dl-url]: https://npmcharts.com/compare/bch-rpc-explorer?minimal=true

7 changes: 7 additions & 0 deletions views/includes/block-content.pug
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,13 @@ div.tab-content
- var bSizeK = result.getblock.size / 1000
span(style="") #{bSizeK.toLocaleString()}
small KB
- var blockSizeLimit = Decimal(result.getblock.ablastate === undefined ? coinConfig.maxBlockSizeByNetwork[activeBlockchain] : result.getblock.ablastate.blocksizelimit);
- var fullRatio = Decimal(result.getblock.size).div(blockSizeLimit);
- var fullPercent = fullRatio.times(100).toDecimalPlaces(1);
- var toolTip = `Limit: ${blockSizeLimit.div(1000).toDecimalPlaces(4)} KB`;
span(title=toolTip, data-toggle="tooltip")  
span.border-dotted #{fullPercent}%
small  Full

if (result.getblock.miner)
div.row
Expand Down
15 changes: 8 additions & 7 deletions views/includes/blocks-list.pug
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,14 @@ div.table-responsive


td.data-cell.text-monospace.text-right
- var data = utils.formatLargeNumber(block.size, 1);
- var fullRatio = block.size / coinConfig.maxBlockSizeByNetwork[activeBlockchain];
- var full = new Decimal(100 * fullRatio).toDecimalPlaces(1);
- var abbr = data[1].abbreviation || "";
- var toolTip = `${data[0]} ${abbr}B`;

span.border-dotted(title=toolTip, data-toggle="tooltip") #{full}%
- var blockSizeLimit = block.ablastate === undefined ? coinConfig.maxBlockSizeByNetwork[activeBlockchain] : block.ablastate.blocksizelimit;
- var fullRatio = Decimal(block.size).div(Decimal(blockSizeLimit));
- var fullPercent = fullRatio.times(100).toDecimalPlaces(1);
- var formattedSize = utils.formatLargeNumber(block.size, 4);
- var abbr = formattedSize[1].abbreviation || "";
- var toolTip = `Size: ${formattedSize[0]} ${abbr}B`;

span.border-dotted(title=toolTip, data-toggle="tooltip") #{fullPercent}%
span
if (full > 90)
img(src="/img/block-fullness-3.png", style="width: 18px; height: 18px;")
Expand Down