Merge pull request #1422 from mempool/nymkappa/bugfix/halving-calculation

Use 10 minutes avg block time for halving calculation
This commit is contained in:
wiz authored and GitHub committed 2022-03-21 03:32:45 +00:00
commit ee3eb65d93
1 file changed
+1 -3
@@ -63,10 +63,8 @@ export class DifficultyComponent implements OnInit {
colorPreviousAdjustments = '#ffffff66';
}
const timeAvgMins = da.timeAvg;
const now = new Date().getTime() / 1000;
const blocksUntilHalving = 210000 - (block.height % 210000);
const timeUntilHalving = (blocksUntilHalving * timeAvgMins * 60 * 1000) + (now * 1000);
const timeUntilHalving = new Date().getTime() + (blocksUntilHalving * 600000);
const data = {
base: `${da.progressPercent.toFixed(2)}%`,