From b0d7f37533d9c738e0619750f7320a356f9201b3 Mon Sep 17 00:00:00 2001 From: Ben Wilson Date: Sun, 6 Aug 2023 23:05:14 -0400 Subject: [PATCH] nearestPowerOfTwo --- src/models/StratumV1ClientStatistics.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/models/StratumV1ClientStatistics.ts b/src/models/StratumV1ClientStatistics.ts index c2b7aa1..b60817e 100644 --- a/src/models/StratumV1ClientStatistics.ts +++ b/src/models/StratumV1ClientStatistics.ts @@ -51,7 +51,8 @@ export class StratumV1ClientStatistics { // miner hasn't submitted shares in one minute if (this.submissionCache.length == 0) { if ((new Date().getTime() - this.submissionCacheStart.getTime()) / 1000 > 60) { - return this.nearestPowerOfTwo(clientDifficulty / 6); + //return this.nearestPowerOfTwo(clientDifficulty / 6); + return clientDifficulty / 6; } else { return null; } @@ -68,7 +69,8 @@ export class StratumV1ClientStatistics { const targetDifficulty = difficultyPerSecond * TARGET_SUBMISSION_PER_SECOND; if ((clientDifficulty * 2) < targetDifficulty || (clientDifficulty / 2) > targetDifficulty) { - return this.nearestPowerOfTwo(targetDifficulty) + // return this.nearestPowerOfTwo(targetDifficulty) + return targetDifficulty; } return null;