mirror of
https://github.com/benjamin-wilson/public-pool.git
synced 2025-03-27 02:02:10 +01:00
nearestPowerOfTwo
This commit is contained in:
parent
72d2f63315
commit
b0d7f37533
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user