Skip to content

Commit

Permalink
feat: more clear revert msg for invalid newEpoch in commitEpoch
Browse files Browse the repository at this point in the history
  • Loading branch information
ericlee42 committed Mar 5, 2024
1 parent bbb77ff commit 0a47999
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion contracts/SequencerSet.sol
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ contract MetisSequencerSet is OwnableUpgradeable {
}

// check conditions
require(_newEpoch == curEpochId + 1, "Invalid epoch id");
require(_newEpoch == curEpochId + 1, "Invalid new epoch number");
require(
_endBlock > _startBlock,
"End block must be greater than start block"
Expand Down
2 changes: 1 addition & 1 deletion ts-src/test/SequencerSet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ describe("MetisSequencerSet", async () => {

await expect(
seqset.connect(mpc).commitEpoch(currentEpochNumber + 2n, 600, 799, seq1),
).to.revertedWith("Invalid epoch id");
).to.revertedWith("Invalid new epoch number");

await expect(
seqset.connect(mpc).commitEpoch(currentEpochNumber + 1n, 900, 799, seq1),
Expand Down

0 comments on commit 0a47999

Please sign in to comment.