Skip to content

Commit

Permalink
validate MaxQueuedTxCount to be lesser or equal to MaxFutureSequenceD…
Browse files Browse the repository at this point in the history
…istance
  • Loading branch information
ganeshvanahalli committed Feb 27, 2025
1 parent 05995f2 commit 43a8199
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions execution/gethexec/sequencer.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,9 @@ func (c *TimeboostConfig) Validate() error {
if c.MaxFutureSequenceDistance == 0 {
return errors.New("timeboost max-future-sequence-distance option cannot be zero, it should be set to a positive value")
}
if c.MaxQueuedTxCount > int(c.MaxFutureSequenceDistance) {
return fmt.Errorf("MaxQueuedTxCount: %d should be lesser than or equal to MaxFutureSequenceDistance: %d", c.MaxQueuedTxCount, c.MaxFutureSequenceDistance)
}
return nil
}

Expand Down

0 comments on commit 43a8199

Please sign in to comment.