Skip to content

Commit

Permalink
fix: more robust finalization
Browse files Browse the repository at this point in the history
  • Loading branch information
TheDZhon committed Oct 3, 2023
1 parent 957fcb8 commit 60942b1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripts/scratch/checks/scratch-acceptance-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,9 @@ async function checkSubmitDepositReportWithdrawal(protocol, state, user1, user2)

const epochsPerFrame = +(await hashConsensusForAO.getFrameConfig()).epochsPerFrame
const initialEpochTimestamp = chainSpec.genesisTime + initialEpoch * chainSpec.slotsPerEpoch * chainSpec.secondsPerSlot
const nextReportEpochTimestamp = initialEpochTimestamp + epochsPerFrame * chainSpec.slotsPerEpoch * chainSpec.secondsPerSlot

// skip two reports to be sure about REQUEST_TIMESTAMP_MARGIN
const nextReportEpochTimestamp = initialEpochTimestamp + 2 * epochsPerFrame * chainSpec.slotsPerEpoch * chainSpec.secondsPerSlot

const timeToWaitTillReportWindow = nextReportEpochTimestamp - latestBlockTimestamp + chainSpec.secondsPerSlot

Expand Down

0 comments on commit 60942b1

Please sign in to comment.