Skip to content

Commit

Permalink
fix: mpc can only commit one epoch once
Browse files Browse the repository at this point in the history
the consensus client has updated, and it doesn't allow to commit multipy epochs at a time
  • Loading branch information
ericlee42 committed Mar 5, 2024
1 parent 4461fa4 commit ca062df
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 @@ -179,7 +179,7 @@ contract MetisSequencerSet is OwnableUpgradeable {
"End block must be greater than start block"
);
require(
(_endBlock - _startBlock + 1) % epochLength == 0,
_endBlock - _startBlock + 1 == epochLength,
"Mismatch epoch length and block length"
);
require(
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 @@ -126,7 +126,7 @@ describe("MetisSequencerSet", async () => {

await mineUpTo(900);
nextEpochNumber++;
await seqset.connect(mpc).commitEpoch(nextEpochNumber, 1000, 1999, seq1);
await seqset.connect(mpc).commitEpoch(nextEpochNumber, 1000, 1199, seq1);
{
const { number, startBlock, endBlock, signer } =
await seqset.finalizedEpoch();
Expand Down

0 comments on commit ca062df

Please sign in to comment.