Skip to content

Commit

Permalink
Fix end epoch start time (#515)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChewingGlass authored Dec 21, 2023
1 parent cf7f564 commit a79e51e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/crons/src/end-epoch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ const MAX_CLAIM_AMOUNT = new BN("207020547945205");

let targetTs = subDaos.reduce(
(acc, subDao) => BN.min(acc, subDao.account.vehntLastCalculatedTs),
new BN(unixNow)
// Start one day back to ensure we at least close the epoch that the job is running in.
new BN(unixNow - 24 * 60 * 60)
);

mainLoop: while (targetTs.toNumber() < unixNow) {
Expand Down

0 comments on commit a79e51e

Please sign in to comment.