Use 10 minutes avg block time for halving calculation

This commit is contained in:
nymkappa 2022-03-21 12:16:41 +09:00
parent 14a4be743a
commit 3e8a34f3fd
No known key found for this signature in database
GPG Key ID: E155910B16E8BD04

View File

@ -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)}%`,