Skip to content

Commit

Permalink
Coverage issue fix (#10598)
Browse files Browse the repository at this point in the history
  • Loading branch information
simsonraj authored Sep 12, 2023
1 parent 627694c commit 3b55fbd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
3 changes: 1 addition & 2 deletions contracts/test/v0.8/dev/OptimismSequencerUptimeFeed.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,7 @@ describe('OptimismSequencerUptimeFeed', () => {
.updateStatus(true, timestamp.add(200))

// Submit another status update with the same status
const currentBlock = await ethers.provider.getBlockNumber()
const latestBlock = await ethers.provider.getBlock(currentBlock)
const latestBlock = await ethers.provider.getBlock('latest')

await expect(tx)
.to.emit(optimismUptimeFeed, 'RoundUpdated')
Expand Down
6 changes: 2 additions & 4 deletions contracts/test/v0.8/dev/OptimismValidator.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,7 @@ describe('OptimismValidator', () => {
it('posts sequencer status when there is not status change', async () => {
await optimismValidator.addAccess(eoaValidator.address)

const currentBlockNum = await ethers.provider.getBlockNumber()
const currentBlock = await ethers.provider.getBlock(currentBlockNum)
const currentBlock = await ethers.provider.getBlock('latest')
const futureTimestamp = currentBlock.timestamp + 5000

await ethers.provider.send('evm_setNextBlockTimestamp', [futureTimestamp])
Expand All @@ -100,8 +99,7 @@ describe('OptimismValidator', () => {
it('post sequencer offline', async () => {
await optimismValidator.addAccess(eoaValidator.address)

const currentBlockNum = await ethers.provider.getBlockNumber()
const currentBlock = await ethers.provider.getBlock(currentBlockNum)
const currentBlock = await ethers.provider.getBlock('latest')
const futureTimestamp = currentBlock.timestamp + 10000

await ethers.provider.send('evm_setNextBlockTimestamp', [futureTimestamp])
Expand Down

0 comments on commit 3b55fbd

Please sign in to comment.