Use BLOCK_WEIGHT_UNITS instead of hard coded block size limit in all occations.

This commit is contained in:
softsimon
2021-08-08 04:19:54 +03:00
parent 2a911d02ff
commit eb20ba05ef
5 changed files with 5 additions and 5 deletions

View File

@@ -169,7 +169,7 @@ export class BlockchainBlocksComponent implements OnInit, OnDestroy {
}
getStyleForBlock(block: Block) {
const greenBackgroundHeight = 100 - (block.weight / 4000000) * 100;
const greenBackgroundHeight = 100 - (block.weight / this.stateService.env.BLOCK_WEIGHT_UNITS) * 100;
let addLeft = 0;
if (block.stage === 1) {