From 74b420c258b960332aa77f87a602fa09bb577425 Mon Sep 17 00:00:00 2001 From: natsoni Date: Wed, 9 Oct 2024 17:05:29 +0900 Subject: [PATCH] Use adjusted block time for difficulty and ETA calculation --- .../src/app/components/difficulty/difficulty.component.html | 2 +- frontend/src/app/services/eta.service.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/app/components/difficulty/difficulty.component.html b/frontend/src/app/components/difficulty/difficulty.component.html index e9bf36515..c70656e04 100644 --- a/frontend/src/app/components/difficulty/difficulty.component.html +++ b/frontend/src/app/components/difficulty/difficulty.component.html @@ -45,7 +45,7 @@
- ~ + ~
Average block time
diff --git a/frontend/src/app/services/eta.service.ts b/frontend/src/app/services/eta.service.ts index 6834237b6..bae442aa3 100644 --- a/frontend/src/app/services/eta.service.ts +++ b/frontend/src/app/services/eta.service.ts @@ -55,7 +55,7 @@ export class EtaService { return { hashratePercentage: acceleratingHashrateFraction * 100, - ETA: Date.now() + da.timeAvg * mempoolPosition.block, + ETA: Date.now() + da.adjustedTimeAvg * mempoolPosition.block, acceleratedETA: this.calculateETAFromShares([ { block: mempoolPosition.block, hashrateShare: (1 - acceleratingHashrateFraction) }, { block: 0, hashrateShare: acceleratingHashrateFraction }, @@ -216,7 +216,7 @@ export class EtaService { } // at max depth, the transaction is guaranteed to be mined in the next block if it hasn't already Q += ((max + 1) * (1-tailProb)); - const eta = da.timeAvg * Q; // T x Q + const eta = da.adjustedTimeAvg * Q; // T x Q return { now,