add network regtest

This commit is contained in:
Antoni Spaanderman
2022-01-20 17:19:16 +01:00
parent 2761eb7b84
commit 25ce6943a6
11 changed files with 102 additions and 11 deletions

View File

@@ -216,12 +216,8 @@ export class BlockComponent implements OnInit, OnDestroy {
this.blockSubsidy = 0;
return;
}
this.blockSubsidy = 50;
let halvenings = Math.floor(this.block.height / 210000);
while (halvenings > 0) {
this.blockSubsidy = this.blockSubsidy / 2;
halvenings--;
}
let halvings = Math.floor(this.block.height / (this.network === 'regtest' ? 150 : 210000));
this.blockSubsidy = 50 * 2 ** -halvings;
}
pageChange(page: number, target: HTMLElement) {