Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Marketen committed Sep 26, 2024
1 parent 23c3151 commit 8cc4311
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
21 changes: 12 additions & 9 deletions packages/brain/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,18 @@ const proofOfValidationCron = new CronJob(shareCronInterval, () =>
proofOfValidationCron.start();

// execute the performance cron task every 1/4 of an epoch
export const trackValidatorsPerformanceCronTask = new CronJob((slotsPerEpoch * secondsPerSlot) / 4 * 1000, async () => {
await trackValidatorsPerformanceCron({
brainDb,
postgresClient,
beaconchainApi,
executionClient,
consensusClient
});
});
export const trackValidatorsPerformanceCronTask = new CronJob(
((slotsPerEpoch * secondsPerSlot) / 4) * 1000,
async () => {
await trackValidatorsPerformanceCron({
brainDb,
postgresClient,
beaconchainApi,
executionClient,
consensusClient
});
}
);
trackValidatorsPerformanceCronTask.start();

// Graceful shutdown
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export async function trackValidatorsPerformanceCron({
}): Promise<void> {
try {
const currentEpoch = await beaconchainApi.getEpochHeader({ blockId: "finalized" });

if (currentEpoch !== lastProcessedEpoch) {
await fetchAndInsertPerformanceCron({
brainDb,
Expand Down

0 comments on commit 8cc4311

Please sign in to comment.