Skip to content

Commit

Permalink
tweak asserts
Browse files Browse the repository at this point in the history
  • Loading branch information
colinlyguo committed Nov 15, 2024
1 parent 9e474f3 commit 19b8230
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion rollup/internal/controller/watcher/batch_proposer.go
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ func (p *BatchProposer) proposeBatch() error {
return fmt.Errorf("failed to retrieve codec for block number %v and time %v", firstUnbatchedChunk.StartBlockNumber, firstUnbatchedChunk.StartBlockTime)
}

if codec.Version() <= encoding.CodecV3 {
if codec.Version() < encoding.CodecV4 {
return fmt.Errorf("unsupported codec version: %v, expected at least %v", codec.Version(), encoding.CodecV4)
}

Expand Down
2 changes: 1 addition & 1 deletion rollup/internal/controller/watcher/bundle_proposer.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ func (p *BundleProposer) proposeBundle() error {
hardforkName := encoding.GetHardforkName(p.chainCfg, firstChunk.StartBlockNumber, firstChunk.StartBlockTime)
codecVersion := encoding.CodecVersion(batches[0].CodecVersion)

if codecVersion <= encoding.CodecV3 {
if codecVersion < encoding.CodecV4 {
return fmt.Errorf("unsupported codec version: %v, expected at least %v", codecVersion, encoding.CodecV4)
}

Expand Down
2 changes: 1 addition & 1 deletion rollup/internal/controller/watcher/chunk_proposer.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ func (p *ChunkProposer) proposeChunk() error {

codecVersion := encoding.GetCodecVersion(p.chainCfg, blocks[0].Header.Number.Uint64(), blocks[0].Header.Time)

if codecVersion <= encoding.CodecV3 {
if codecVersion < encoding.CodecV4 {
return fmt.Errorf("unsupported codec version: %v, expected at least %v", codecVersion, encoding.CodecV4)
}

Expand Down

0 comments on commit 19b8230

Please sign in to comment.