Skip to content
This repository was archived by the owner on Mar 18, 2025. It is now read-only.

Commit 903ccae

Browse files
will pankiewiczwill pankiewicz
authored andcommitted
make constant
1 parent 109d27b commit 903ccae

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

packages/common/src/constants.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,3 +207,5 @@ export const USE_PROVIDER = true;
207207
export const USE_NOMINATIONS = true;
208208
export const USE_RPC = true;
209209
export const USE_CLIENT = true;
210+
211+
export const MAX_ERAS_POINTS = 85;

packages/common/src/scorekeeper/jobs/specificJobs/EraPointsJob.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ChainData, logger, queries } from "../../../index";
1+
import { ChainData, Constants, logger, queries } from "../../../index";
22
import { Job, JobConfig, JobRunnerMetadata, JobStatus } from "../JobsClass";
33
import { jobStatusEmitter } from "../../../Events";
44
import { withExecutionTimeLogging } from "../../../utils";
@@ -67,7 +67,11 @@ export const eraPointsJob = async (
6767
const totalEras = activeEra;
6868
let processedEras = 0;
6969

70-
for (let i = activeEra - 1; i >= activeEra - 85; i--) {
70+
for (
71+
let i = activeEra - 1;
72+
i >= activeEra - Constants.MAX_ERAS_POINTS;
73+
i--
74+
) {
7175
await individualEraPointsJob(chaindata, i);
7276

7377
// Calculate progress percentage

0 commit comments

Comments
 (0)