Skip to content

Commit

Permalink
fix: validator epoch calc
Browse files Browse the repository at this point in the history
  • Loading branch information
shotaronowhere committed Oct 20, 2023
1 parent bebe362 commit 14e78c1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions validator-cli/src/utils/devnet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ async function happyPath(
) {
let currentTS = Math.floor(Date.now() / 1000);
let claimableEpoch = Math.floor(currentTS / epochPeriod);
const verifiedEpoch = await veaOutbox.latestVerifiedEpoch();
if (verifiedEpoch.toNumber() >= claimableEpoch) {
return;
}
const snapshot = await veaInbox.snapshots(claimableEpoch);

if (snapshot == "0x0000000000000000000000000000000000000000000000000000000000000000") {
Expand Down

0 comments on commit 14e78c1

Please sign in to comment.