Skip to content

Commit

Permalink
Define MaxStopBlock constant
Browse files Browse the repository at this point in the history
Add a new MaxStopBlock constant set to math.MaxUint64. This change simplifies the code by using a predefined maximum stop block value for the poller logic.
  • Loading branch information
billettc committed Nov 26, 2024
1 parent c5f782f commit 51f831a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions blockpoller/poller.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ func New[C any](
return b
}

const MaxStopBlock = math.MaxUint64

func (p *BlockPoller[C]) Run(firstStreamableBlockNum uint64, stopBlock *uint64, blockFetchBatchSize int) error {
p.startBlockNumGate = firstStreamableBlockNum
p.logger.Info("starting poller",
Expand Down

0 comments on commit 51f831a

Please sign in to comment.