mirror of
https://github.com/benjamin-wilson/public-pool.git
synced 2026-09-29 09:05:06 -07:00
tweaks
This commit is contained in:
@@ -33,8 +33,8 @@ export class AppController {
|
|||||||
|
|
||||||
const chartData = await this.clientStatisticsService.getChartDataForSite();
|
const chartData = await this.clientStatisticsService.getChartDataForSite();
|
||||||
|
|
||||||
await this.cacheManager.set(CACHE_KEY, chartData, 600);
|
//5 min
|
||||||
|
await this.cacheManager.set(CACHE_KEY, chartData, 5 * 60 * 1000);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
chartData,
|
chartData,
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ export class StratumV1ClientStatistics {
|
|||||||
|
|
||||||
const targetDifficulty = difficultyPerSecond * TARGET_SUBMISSION_PER_SECOND;
|
const targetDifficulty = difficultyPerSecond * TARGET_SUBMISSION_PER_SECOND;
|
||||||
|
|
||||||
if (clientDifficulty << 1 < targetDifficulty || clientDifficulty >> 1 > targetDifficulty) {
|
if ((clientDifficulty * 2) < targetDifficulty || (clientDifficulty / 2) > targetDifficulty) {
|
||||||
return this.nearestPowerOfTwo(targetDifficulty)
|
return this.nearestPowerOfTwo(targetDifficulty)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user