Skip to content

Commit

Permalink
fix: off-by-one error on new environments
Browse files Browse the repository at this point in the history
  • Loading branch information
juanmardefago committed Mar 2, 2023
1 parent 2d160a8 commit 6f18ba6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mappings/epochManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export function handleEpochLengthUpdate(event: EpochLengthUpdate): void {
// Will only ever be 0 on initialization in the contracts
graphNetwork.epochLength = event.params.epochLength.toI32()
graphNetwork.lastLengthUpdateBlock = (addresses.isL1 ? event.block.number : graphNetwork.currentL1BlockNumber!).toI32()
graphNetwork.currentEpoch = 0
graphNetwork.currentEpoch = event.params.epoch.toI32()
graphNetwork.epochCount = 1
graphNetwork.lastLengthUpdateEpoch = graphNetwork.currentEpoch
graphNetwork.save()
Expand Down

0 comments on commit 6f18ba6

Please sign in to comment.