From 51f831a2d2e8f9b0ef965064926bee6b56db0ce7 Mon Sep 17 00:00:00 2001 From: Charles Billette Date: Tue, 26 Nov 2024 09:36:06 -0500 Subject: [PATCH] Define MaxStopBlock constant 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. --- blockpoller/poller.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/blockpoller/poller.go b/blockpoller/poller.go index 3daaed8..dafe9b1 100644 --- a/blockpoller/poller.go +++ b/blockpoller/poller.go @@ -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",